Merge remote-tracking branch 'fourplusone/fix/windows-tests'
This commit is contained in:
		
							
								
								
									
										30
									
								
								appveyor.yml
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								appveyor.yml
									
									
									
									
									
								
							| @@ -4,13 +4,15 @@ 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' | ||||
| init: | ||||
| - cmd: '%PIP% install nose wheel' | ||||
| build_script: | ||||
| - cmd: | | ||||
|     set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\build\libgit2 | ||||
| @@ -18,15 +20,19 @@ 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 . | ||||
|      | ||||
|     "%PYTHON%" setup.py bdist_wheel  | ||||
|     "%PIP%" install . | ||||
| test_script: | ||||
| - cmd: '%PYTHON% setup.py test' | ||||
| - ps: | | ||||
|     cp build\Release\git2.dll . | ||||
|     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)) | ||||
|  | ||||
| artifacts: | ||||
| - path: dist\*.whl | ||||
|   | ||||
| @@ -35,6 +35,7 @@ import tarfile | ||||
| import tempfile | ||||
| import unittest | ||||
| import hashlib | ||||
| import gc | ||||
|  | ||||
| import pygit2 | ||||
|  | ||||
| @@ -94,6 +95,7 @@ class NoRepoTestCase(unittest.TestCase): | ||||
|  | ||||
|     def tearDown(self): | ||||
|         del self.repo | ||||
|         gc.collect() | ||||
|         rmtree(self._temp_dir) | ||||
|  | ||||
|     def assertRaisesAssign(self, exc_class, instance, name, value): | ||||
| @@ -132,8 +134,8 @@ class AutoRepoTestCase(NoRepoTestCase): | ||||
|         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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 J. David Ibáñez
					J. David Ibáñez