Show More
@@ -12,6 +12,7 b' import errno' | |||
|
12 | 12 | from glob import glob |
|
13 | 13 | import json |
|
14 | 14 | import os |
|
15 | import re | |
|
15 | 16 | import shutil |
|
16 | 17 | from subprocess import call, check_call, check_output, PIPE, STDOUT, CalledProcessError |
|
17 | 18 | try: |
@@ -70,6 +71,13 b' def get_pull_request(num, project="ipython/ipython"):' | |||
|
70 | 71 | response = urlopen(url).read().decode('utf-8') |
|
71 | 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 | 81 | def merge_branch(repo, branch, owner): |
|
74 | 82 | merged_branch = "%s-%s" % (owner, branch) |
|
75 | 83 | os.chdir(repodir) |
@@ -124,18 +132,22 b" if __name__ == '__main__':" | |||
|
124 | 132 | results = [] |
|
125 | 133 | for py, venv in venvs: |
|
126 | 134 | passed, log = run_tests(venv) |
|
135 | missing_libraries = get_missing_libraries(log) | |
|
127 | 136 | if passed: |
|
128 | results.append((py, True, None)) | |
|
137 | results.append((py, True, None, missing_libraries)) | |
|
129 | 138 | else: |
|
130 | 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 | 142 | print("\n") |
|
134 | 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 | 146 | if passed: |
|
137 | 147 | print(py, ":", "OK") |
|
138 | 148 | else: |
|
139 | 149 | print(py, ":", "Failed") |
|
140 | 150 | print(" Test log:", gist_url) |
|
151 | if missing_libraries: | |
|
152 | print(" Libraries not available:", missing_libraries) | |
|
141 | 153 | print("Not available for testing:", ", ".join(unavailable_pythons)) |
General Comments 0
You need to be logged in to leave comments.
Login now