From cdd57b2c0f6fade04dc4cb6b33ad7bdb62994bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Fri, 22 Jul 2016 10:46:11 +0200 Subject: [PATCH 1/8] make sure the repo object will be collected before the repo is removed --- test/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils.py b/test/utils.py index a751e91b1..01c07b542 100644 --- a/test/utils.py +++ b/test/utils.py @@ -35,6 +35,7 @@ import tempfile import unittest import hashlib +import gc import pygit2 @@ -94,6 +95,7 @@ def setUp(self): def tearDown(self): del self.repo + gc.collect() rmtree(self._temp_dir) def assertRaisesAssign(self, exc_class, instance, name, value): @@ -132,8 +134,8 @@ def setUp(self): self.repo = pygit2.Repository(self.repo_path) def tearDown(self): - self.repo_ctxtmgr.__exit__(None, None, None) super(AutoRepoTestCase, self).tearDown() + self.repo_ctxtmgr.__exit__(None, None, None) class BareRepoTestCase(AutoRepoTestCase): From fd1e9e3d356eda0d0c4c528fe5864f2af350ff61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 15:54:54 +0200 Subject: [PATCH 2/8] Update appveyor.yml upload test results --- appveyor.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c6fa68116..b37f6e537 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,11 @@ build_script: %PIP% install . test_script: -- cmd: '%PYTHON% setup.py test' +- ps: >- + & $env:PYTHON setup.py nosetests --with-xunit + # upload results to AppVeyor + $wc = New-Object 'System.Net.WebClient' + $wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\nosetests.xml)) + artifacts: - path: dist\*.whl From 7fe7a4da8d22d424e0c21109828d42349e66c1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 21:50:17 +0200 Subject: [PATCH 3/8] Remove qoutes from env vars --- appveyor.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b37f6e537..2632a2d40 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,13 +4,13 @@ configuration: Release environment: matrix: - ARCH: 32 - GENERATOR: '"Visual Studio 11"' - PYTHON: '"C:\Python35\python.exe"' - PIP: '"C:\Python35\Scripts\pip.exe"' + GENERATOR: 'Visual Studio 11' + PYTHON: 'C:\Python35\python.exe' + PIP: 'C:\Python35\Scripts\pip.exe' - ARCH: 64 - GENERATOR: '"Visual Studio 11 Win64"' - PYTHON: '"C:\Python35-x64\python.exe"' - PIP: '"C:\Python35-x64\Scripts\pip.exe"' + GENERATOR: 'Visual Studio 11 Win64' + PYTHON: 'C:\Python35-x64\python.exe' + PIP: 'C:\Python35-x64\Scripts\pip.exe' build_script: - cmd: | set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\build\libgit2 @@ -18,13 +18,13 @@ build_script: mkdir build cd build - cmake -DSTDCALL=OFF -DBUILD_CLAR=OFF -DCMAKE_INSTALL_PREFIX=%LIBGIT2% ../libgit2 -G %GENERATOR% + cmake -DSTDCALL=OFF -DBUILD_CLAR=OFF -DCMAKE_INSTALL_PREFIX="%LIBGIT2%" ../libgit2 -G "%GENERATOR%" cmake --build . --config Release --target install cd .. - %PIP% install wheel - %PYTHON% setup.py bdist_wheel - %PIP% install . + "%PIP%" install wheel + "%PYTHON%" setup.py bdist_wheel + "%PIP%" install . test_script: - ps: >- From 1afbde0d7f6b14455c27d80a7a1eb41337db378d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 21:56:21 +0200 Subject: [PATCH 4/8] install dependencies in init script --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2632a2d40..1fbed6b95 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,8 @@ environment: GENERATOR: 'Visual Studio 11 Win64' PYTHON: 'C:\Python35-x64\python.exe' PIP: 'C:\Python35-x64\Scripts\pip.exe' +init: +- cmd: '%PIP% install nose wheel' build_script: - cmd: | set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\build\libgit2 @@ -22,7 +24,6 @@ build_script: cmake --build . --config Release --target install cd .. - "%PIP%" install wheel "%PYTHON%" setup.py bdist_wheel "%PIP%" install . From 0e270c72bd15ceb2c465186de500316e62f0dec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 22:12:00 +0200 Subject: [PATCH 5/8] Update appveyor.yml --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1fbed6b95..c240d33dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,8 @@ build_script: "%PYTHON%" setup.py bdist_wheel "%PIP%" install . - +on_failure: +- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) test_script: - ps: >- & $env:PYTHON setup.py nosetests --with-xunit From dae61ded382fe3fab02504c9483714cb65c3e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 22:52:41 +0200 Subject: [PATCH 6/8] Update appveyor.yml --- appveyor.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c240d33dc..4d6e69cbd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,11 +26,10 @@ build_script: "%PYTHON%" setup.py bdist_wheel "%PIP%" install . -on_failure: -- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) test_script: - ps: >- - & $env:PYTHON setup.py nosetests --with-xunit + cp build\Release\git2.dll . + try { & $env:PYTHON setup.py nosetests --with-xunit } # upload results to AppVeyor $wc = New-Object 'System.Net.WebClient' $wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\nosetests.xml)) From 30980751cfd3ff63844b641e9d8e663c3fb2d7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 22:55:05 +0200 Subject: [PATCH 7/8] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4d6e69cbd..da7be71c3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ build_script: "%PYTHON%" setup.py bdist_wheel "%PIP%" install . test_script: -- ps: >- +- ps: | cp build\Release\git2.dll . try { & $env:PYTHON setup.py nosetests --with-xunit } # upload results to AppVeyor From faf6a63d25d9c12d7480e9b4faf4d6531b13b7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Sun, 24 Jul 2016 22:57:05 +0200 Subject: [PATCH 8/8] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index da7be71c3..4cc04001e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ build_script: test_script: - ps: | cp build\Release\git2.dll . - try { & $env:PYTHON setup.py nosetests --with-xunit } + try { & $env:PYTHON setup.py nosetests --with-xunit } catch {} # upload results to AppVeyor $wc = New-Object 'System.Net.WebClient' $wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\nosetests.xml))