Show More
@@ -17,6 +17,7 b' import pickle' | |||||
17 | import re |
|
17 | import re | |
18 | import requests |
|
18 | import requests | |
19 | import shutil |
|
19 | import shutil | |
|
20 | import time | |||
20 | from subprocess import call, check_call, check_output, PIPE, STDOUT, CalledProcessError |
|
21 | from subprocess import call, check_call, check_output, PIPE, STDOUT, CalledProcessError | |
21 | import sys |
|
22 | import sys | |
22 |
|
23 | |||
@@ -83,7 +84,8 b' def get_branch(repo, branch, owner, mergeable):' | |||||
83 | # Delete the branch first |
|
84 | # Delete the branch first | |
84 | call(['git', 'branch', '-D', merged_branch]) |
|
85 | call(['git', 'branch', '-D', merged_branch]) | |
85 | check_call(['git', 'checkout', '-b', merged_branch]) |
|
86 | check_call(['git', 'checkout', '-b', merged_branch]) | |
86 | check_call(['git', 'pull', repo, branch]) |
|
87 | check_call(['git', 'pull', '--no-commit', repo, branch]) | |
|
88 | check_call(['git', 'commit', '-m', "merge %s/%s" % (repo, branch)]) | |||
87 | else: |
|
89 | else: | |
88 | # Fetch the branch without merging it. |
|
90 | # Fetch the branch without merging it. | |
89 | check_call(['git', 'fetch', repo, branch]) |
|
91 | check_call(['git', 'fetch', repo, branch]) | |
@@ -94,6 +96,9 b' def run_tests(venv):' | |||||
94 | py = os.path.join(basedir, venv, 'bin', 'python') |
|
96 | py = os.path.join(basedir, venv, 'bin', 'python') | |
95 | print(py) |
|
97 | print(py) | |
96 | os.chdir(repodir) |
|
98 | os.chdir(repodir) | |
|
99 | # cleanup build-dir | |||
|
100 | if os.path.exists('build'): | |||
|
101 | shutil.rmtree('build') | |||
97 | check_call([py, 'setup.py', 'install']) |
|
102 | check_call([py, 'setup.py', 'install']) | |
98 | os.chdir(basedir) |
|
103 | os.chdir(basedir) | |
99 |
|
104 | |||
@@ -203,7 +208,10 b' def test_pr(num, post_results=True):' | |||||
203 |
|
208 | |||
204 | results = [] |
|
209 | results = [] | |
205 | for py, venv in venvs: |
|
210 | for py, venv in venvs: | |
|
211 | tic = time.time() | |||
206 | passed, log = run_tests(venv) |
|
212 | passed, log = run_tests(venv) | |
|
213 | elapsed = int(time.time() - tic) | |||
|
214 | print("Ran tests with %s in %is" % (py, elapsed)) | |||
207 | missing_libraries = get_missing_libraries(log) |
|
215 | missing_libraries = get_missing_libraries(log) | |
208 | if passed: |
|
216 | if passed: | |
209 | results.append((py, True, None, missing_libraries)) |
|
217 | results.append((py, True, None, missing_libraries)) |
General Comments 0
You need to be logged in to leave comments.
Login now