Show More
@@ -12,6 +12,7 b' import errno' | |||||
12 | from glob import glob |
|
12 | from glob import glob | |
13 | import json |
|
13 | import json | |
14 | import os |
|
14 | import os | |
|
15 | import re | |||
15 | import shutil |
|
16 | import shutil | |
16 | from subprocess import call, check_call, check_output, PIPE, STDOUT, CalledProcessError |
|
17 | from subprocess import call, check_call, check_output, PIPE, STDOUT, CalledProcessError | |
17 | try: |
|
18 | try: | |
@@ -70,6 +71,13 b' def get_pull_request(num, project="ipython/ipython"):' | |||||
70 | response = urlopen(url).read().decode('utf-8') |
|
71 | response = urlopen(url).read().decode('utf-8') | |
71 | return json.loads(response) |
|
72 | return json.loads(response) | |
72 |
|
73 | |||
|
74 | missing_libs_re = re.compile(r"Tools and libraries NOT available at test time:\n" | |||
|
75 | r"\s*(.*?)\n") | |||
|
76 | def get_missing_libraries(log): | |||
|
77 | m = missing_libs_re.search(log) | |||
|
78 | if m: | |||
|
79 | return m.group(1) | |||
|
80 | ||||
73 | def merge_branch(repo, branch, owner): |
|
81 | def merge_branch(repo, branch, owner): | |
74 | merged_branch = "%s-%s" % (owner, branch) |
|
82 | merged_branch = "%s-%s" % (owner, branch) | |
75 | os.chdir(repodir) |
|
83 | os.chdir(repodir) | |
@@ -124,18 +132,22 b" if __name__ == '__main__':" | |||||
124 | results = [] |
|
132 | results = [] | |
125 | for py, venv in venvs: |
|
133 | for py, venv in venvs: | |
126 | passed, log = run_tests(venv) |
|
134 | passed, log = run_tests(venv) | |
|
135 | missing_libraries = get_missing_libraries(log) | |||
127 | if passed: |
|
136 | if passed: | |
128 | results.append((py, True, None)) |
|
137 | results.append((py, True, None, missing_libraries)) | |
129 | else: |
|
138 | else: | |
130 | gist_url = post_gist(log) |
|
139 | gist_url = post_gist(log) | |
131 | results.append((py, False, gist_url)) |
|
140 | results.append((py, False, gist_url, missing_libraries)) | |
132 |
|
141 | |||
133 | print("\n") |
|
142 | print("\n") | |
134 | print("**Test results for commit %s merged into master**" % pr['head']['sha'][:7]) |
|
143 | print("**Test results for commit %s merged into master**" % pr['head']['sha'][:7]) | |
135 | for py, passed, gist_url in results: |
|
144 | print("Platform:", sys.platform) | |
|
145 | for py, passed, gist_url, missing_libraries in results: | |||
136 | if passed: |
|
146 | if passed: | |
137 | print(py, ":", "OK") |
|
147 | print(py, ":", "OK") | |
138 | else: |
|
148 | else: | |
139 | print(py, ":", "Failed") |
|
149 | print(py, ":", "Failed") | |
140 | print(" Test log:", gist_url) |
|
150 | print(" Test log:", gist_url) | |
|
151 | if missing_libraries: | |||
|
152 | print(" Libraries not available:", missing_libraries) | |||
141 | print("Not available for testing:", ", ".join(unavailable_pythons)) |
|
153 | print("Not available for testing:", ", ".join(unavailable_pythons)) |
General Comments 0
You need to be logged in to leave comments.
Login now