Skip to content

Commit

Permalink
Use POLLY_ROOT to detect build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jan 30, 2016
1 parent e1f9a66 commit fb4b5ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ install:
- cmd: set POLLY_VERSION="0.9.0"
- cmd: appveyor DownloadFile "https://github.com/ruslo/polly/archive/v%POLLY_VERSION%.tar.gz"
- cmd: cmake -E tar xf "v%POLLY_VERSION%.tar.gz"
- cmd: set PATH=%cd%\polly-%POLLY_VERSION%\bin;%PATH%
- cmd: set POLLY_ROOT=%cd%\polly-%POLLY_VERSION%

# Python 3 for Polly
- cmd: set PATH=C:\Python34-x64;%PATH%
Expand Down
15 changes: 11 additions & 4 deletions jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,22 @@ def run():
else:
shutil.rmtree(to_remove)

build_script = 'build.py'
if os.name == 'nt':
which = 'where'
else:
which = 'which'

build_script = subprocess.check_output(
[which, 'build.py'], universal_newlines=True
).split('\n')[0]
polly_root = os.getenv('POLLY_ROOT')
if polly_root:
print('Using POLLY_ROOT: {}'.format(polly_root))
build_script = os.path.join(polly_root, 'bin', 'build.py')
else:
build_script = subprocess.check_output(
[which, 'build.py'], universal_newlines=True
).split('\n')[0]

if not os.path.exists(build_script):
sys.exit('Script not found: {}'.format(build_script))

print('Testing in: {}'.format(testing_dir))
os.chdir(testing_dir)
Expand Down

0 comments on commit fb4b5ca

Please sign in to comment.