Skip to content

Commit

Permalink
Merge remote-tracking branch 'fourplusone/fix/windows-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavid committed Oct 13, 2016
2 parents 9b364dc + faf6a63 commit 6d6931c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
30 changes: 18 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,35 @@ 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
git clone --depth=1 -b maint/v0.24 https://github.com/libgit2/libgit2.git libgit2
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
4 changes: 3 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import tempfile
import unittest
import hashlib
import gc

import pygit2

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 6d6931c

Please sign in to comment.