]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/miri/test-cargo-miri/run-test.py
Rollup merge of #103521 - chenyukang:yukang/fix-103451-avoid-hang, r=jackh726,wesleywiser
[rust.git] / src / tools / miri / test-cargo-miri / run-test.py
index 4485d3252ccc2c3b3bb0af621d10e4be54108d9c..c611b9c44be9df792b13dede1a94fe61d262d680 100755 (executable)
@@ -33,10 +33,13 @@ def normalize_stderr(str):
     return str
 
 def check_output(actual, path, name):
+    if 'MIRI_BLESS' in os.environ:
+        open(path, mode='w').write(actual)
+        return True
     expected = open(path).read()
     if expected == actual:
         return True
-    print(f"{path} did not match reference!")
+    print(f"{name} output did not match reference in {path}!")
     print(f"--- BEGIN diff {name} ---")
     for text in difflib.unified_diff(expected.split("\n"), actual.split("\n")):
         print(text)