Skip to content

Commit 5474f13

Browse files
committed
Fix run-test.py
1 parent ef9419b commit 5474f13

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test-cargo-miri/run-test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def normalize_stdout(str):
2727
str = str.replace("src\\", "src/") # normalize paths across platforms
2828
return re.sub("finished in \d+\.\d\ds", "finished in $TIME", str)
2929

30-
def check_output(expected, actual, path, name):
30+
def check_output(actual, path, name):
3131
expected = open(path).read()
3232
if expected == actual:
3333
return True
@@ -54,7 +54,11 @@ def test(name, cmd, stdout_ref, stderr_ref, stdin=b'', env={}):
5454
stdout = stdout.decode("UTF-8")
5555
stderr = stderr.decode("UTF-8")
5656
stdout = normalize_stdout(stdout)
57-
if p.returncode == 0 and check_output(stdout, stdout_ref, "stdout") and check_output(stderr, stderr_ref, "stderr"):
57+
58+
stdout_matches = check_output(stdout, stdout_ref, "stdout")
59+
stderr_matches = check_output(stderr, stderr_ref, "stderr")
60+
61+
if p.returncode == 0 and stdout_matches and stderr_matches:
5862
# All good!
5963
return
6064
fail("exit code was {}".format(p.returncode))

0 commit comments

Comments
 (0)