Skip to content

Commit 3a1390c

Browse files
authoredSep 17, 2019
Rollup merge of rust-lang#64502 - RalfJung:miri-toolstate, r=pietroalbini
avoid duplicate issues for Miri build failures Currently, when Miri regressed from test-pass to test-fail, we pen an issue -- and then when it regresses further from test-fail to build-fail, we open a *second* issue. This changes the logic to avoid the redundant second issue for Miri. r? @pietroalbini @kennytm
2 parents d6f2205 + 388cd5d commit 3a1390c

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed
 

‎src/tools/publish_toolstate.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def update_latest(
201201
new = s.get(tool, old)
202202
status[os] = new
203203
maintainers = ' '.join('@'+name for name in MAINTAINERS[tool])
204-
if new > old: # comparing the strings, but they are ordered appropriately!
204+
# comparing the strings, but they are ordered appropriately:
205+
# "test-pass" > "test-fail" > "build-fail"
206+
if new > old:
205207
# things got fixed or at least the status quo improved
206208
changed = True
207209
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
@@ -213,10 +215,17 @@ def update_latest(
213215
.format(tool, os, old, new)
214216
message += '{} (cc {}, @rust-lang/infra).\n' \
215217
.format(title, maintainers)
216-
# Most tools only create issues for build failures.
217-
# Other failures can be spurious.
218-
if new == 'build-fail' or (tool == 'miri' and new == 'test-fail'):
219-
create_issue_for_status = new
218+
# See if we need to create an issue.
219+
if tool == 'miri':
220+
# Create issue if tests used to pass before. Don't open a *second*
221+
# issue when we regress from "test-fail" to "build-fail".
222+
if old == 'test-pass':
223+
create_issue_for_status = new
224+
else:
225+
# Create issue if things no longer build.
226+
# (No issue for mere test failures to avoid spurious issues.)
227+
if new == 'build-fail':
228+
create_issue_for_status = new
220229

221230
if create_issue_for_status is not None:
222231
try:

0 commit comments

Comments
 (0)
Please sign in to comment.