[llvm] 31948b3 - [Util] Make pass-test-update.py test case more resilient (NFC) (#155303)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 15:03:10 PDT 2025


Author: Henrik G. Olsson
Date: 2025-08-25T22:03:06Z
New Revision: 31948b3a46e6a2d02fb058351c7101eda21e84e2

URL: https://github.com/llvm/llvm-project/commit/31948b3a46e6a2d02fb058351c7101eda21e84e2
DIFF: https://github.com/llvm/llvm-project/commit/31948b3a46e6a2d02fb058351c7101eda21e84e2.diff

LOG: [Util] Make pass-test-update.py test case more resilient (NFC) (#155303)

This test case matches against python traceback output, which seems to
vary slightly between versions. This relaxes the constraints a bit to
make the test pass on buildbots.

Added: 
    

Modified: 
    llvm/utils/lit/tests/pass-test-update.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/tests/pass-test-update.py b/llvm/utils/lit/tests/pass-test-update.py
index e3efb9df919c4..f23bce9838f35 100644
--- a/llvm/utils/lit/tests/pass-test-update.py
+++ b/llvm/utils/lit/tests/pass-test-update.py
@@ -1,39 +1,34 @@
 # RUN: %{lit} --update-tests --ignore-fail -v %S/Inputs/pass-test-update | FileCheck %s --implicit-check-not Exception
 
-# CHECK:      UNRESOLVED: pass-test-update :: fail.test (1 of 5)
-# CHECK-NEXT: ******************** TEST 'pass-test-update :: fail.test' FAILED ********************
-# CHECK-NEXT: # {{R}}UN: at line 1
-# CHECK-NEXT: not echo "fail"
-# CHECK-NEXT: # executed command: not echo fail
-# CHECK-NEXT: # .---command stdout------------
-# CHECK-NEXT: # | fail
-# CHECK-NEXT: # `-----------------------------
-# CHECK-NEXT: # error: command failed with exit status: 1
-# CHECK-NEXT: Exception occurred in test updater:
-# CHECK-NEXT: Traceback (most recent call last):
-# CHECK-NEXT:   File {{.*}}, line {{.*}}, in {{.*}}
-# CHECK-NEXT:     update_output = test_updater(result, test)
-# CHECK-NEXT:   File "{{.*}}/should_not_run.py", line {{.*}}, in should_not_run
-# CHECK-NEXT:     raise Exception("this test updater should only run on failure")
-# CHECK-NEXT: Exception: this test updater should only run on failure
-# CHECK-EMPTY:
-# CHECK-NEXT: ********************
-# CHECK-NEXT: PASS: pass-test-update :: pass-silent.test (2 of 5)
-# CHECK-NEXT: PASS: pass-test-update :: pass.test (3 of 5)
-# CHECK-NEXT: {{X}}FAIL: pass-test-update :: xfail.test (4 of 5)
-# CHECK-NEXT: XPASS: pass-test-update :: xpass.test (5 of 5)
-# CHECK-NEXT: ******************** TEST 'pass-test-update :: xpass.test' FAILED ********************
-# CHECK-NEXT: Exit Code: 0
-# CHECK-EMPTY:
-# CHECK-NEXT: Command Output (stdout):
-# CHECK-NEXT: --
-# CHECK-NEXT: # {{R}}UN: at line 2
-# CHECK-NEXT: echo "accidentally passed"
-# CHECK-NEXT: # executed command: echo 'accidentally passed'
-# CHECK-NEXT: # .---command stdout------------
-# CHECK-NEXT: # | accidentally passed
-# CHECK-NEXT: # `-----------------------------
-# CHECK-EMPTY:
-# CHECK-NEXT: --
-# CHECK-EMPTY:
-# CHECK-NEXT: ********************
+# CHECK: UNRESOLVED: pass-test-update :: fail.test (1 of 5)
+# CHECK: ******************** TEST 'pass-test-update :: fail.test' FAILED ********************
+# CHECK: # {{R}}UN: at line 1
+# CHECK: not echo "fail"
+# CHECK: # executed command: not echo fail
+# CHECK: # .---command stdout------------
+# CHECK: # | fail
+# CHECK: # `-----------------------------
+# CHECK: # error: command failed with exit status: 1
+# CHECK: Exception occurred in test updater:
+# CHECK: Traceback (most recent call last):
+# CHECK:   File {{.*}}, line {{.*}}, in {{.*}}
+# CHECK:     update_output = test_updater(result, test)
+# CHECK:   File "{{.*}}/should_not_run.py", line {{.*}}, in should_not_run
+# CHECK:     raise Exception("this test updater should only run on failure")
+# CHECK: Exception: this test updater should only run on failure
+# CHECK: ********************
+# CHECK: PASS: pass-test-update :: pass-silent.test (2 of 5)
+# CHECK: PASS: pass-test-update :: pass.test (3 of 5)
+# CHECK: {{X}}FAIL: pass-test-update :: xfail.test (4 of 5)
+# CHECK: XPASS: pass-test-update :: xpass.test (5 of 5)
+# CHECK: ******************** TEST 'pass-test-update :: xpass.test' FAILED ********************
+# CHECK: Exit Code: 0
+# CHECK: Command Output (stdout):
+# CHECK: --
+# CHECK: # {{R}}UN: at line 2
+# CHECK: echo "accidentally passed"
+# CHECK: # executed command: echo 'accidentally passed'
+# CHECK: # .---command stdout------------
+# CHECK: # | accidentally passed
+# CHECK: # `-----------------------------
+# CHECK: ********************


        


More information about the llvm-commits mailing list