Skip to content

Commit eabe978

Browse files
committed
[Util] Make pass-test-update.py test case more resilient (NFC) (llvm#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. (cherry picked from commit 31948b3)
1 parent eb6557c commit eabe978

File tree

1 file changed

+32
-37
lines changed

1 file changed

+32
-37
lines changed
Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
11
# RUN: %{lit} --update-tests --ignore-fail -v %S/Inputs/pass-test-update | FileCheck %s --implicit-check-not Exception
22

3-
# CHECK: UNRESOLVED: pass-test-update :: fail.test (1 of 5)
4-
# CHECK-NEXT: ******************** TEST 'pass-test-update :: fail.test' FAILED ********************
5-
# CHECK-NEXT: # {{R}}UN: at line 1
6-
# CHECK-NEXT: not echo "fail"
7-
# CHECK-NEXT: # executed command: not echo fail
8-
# CHECK-NEXT: # .---command stdout------------
9-
# CHECK-NEXT: # | fail
10-
# CHECK-NEXT: # `-----------------------------
11-
# CHECK-NEXT: # error: command failed with exit status: 1
12-
# CHECK-NEXT: Exception occurred in test updater:
13-
# CHECK-NEXT: Traceback (most recent call last):
14-
# CHECK-NEXT: File {{.*}}, line {{.*}}, in {{.*}}
15-
# CHECK-NEXT: update_output = test_updater(result, test)
16-
# CHECK-NEXT: File "{{.*}}/should_not_run.py", line {{.*}}, in should_not_run
17-
# CHECK-NEXT: raise Exception("this test updater should only run on failure")
18-
# CHECK-NEXT: Exception: this test updater should only run on failure
19-
# CHECK-EMPTY:
20-
# CHECK-NEXT: ********************
21-
# CHECK-NEXT: PASS: pass-test-update :: pass-silent.test (2 of 5)
22-
# CHECK-NEXT: PASS: pass-test-update :: pass.test (3 of 5)
23-
# CHECK-NEXT: {{X}}FAIL: pass-test-update :: xfail.test (4 of 5)
24-
# CHECK-NEXT: XPASS: pass-test-update :: xpass.test (5 of 5)
25-
# CHECK-NEXT: ******************** TEST 'pass-test-update :: xpass.test' FAILED ********************
26-
# CHECK-NEXT: Exit Code: 0
27-
# CHECK-EMPTY:
28-
# CHECK-NEXT: Command Output (stdout):
29-
# CHECK-NEXT: --
30-
# CHECK-NEXT: # {{R}}UN: at line 2
31-
# CHECK-NEXT: echo "accidentally passed"
32-
# CHECK-NEXT: # executed command: echo 'accidentally passed'
33-
# CHECK-NEXT: # .---command stdout------------
34-
# CHECK-NEXT: # | accidentally passed
35-
# CHECK-NEXT: # `-----------------------------
36-
# CHECK-EMPTY:
37-
# CHECK-NEXT: --
38-
# CHECK-EMPTY:
39-
# CHECK-NEXT: ********************
3+
# CHECK: UNRESOLVED: pass-test-update :: fail.test (1 of 5)
4+
# CHECK: ******************** TEST 'pass-test-update :: fail.test' FAILED ********************
5+
# CHECK: # {{R}}UN: at line 1
6+
# CHECK: not echo "fail"
7+
# CHECK: # executed command: not echo fail
8+
# CHECK: # .---command stdout------------
9+
# CHECK: # | fail
10+
# CHECK: # `-----------------------------
11+
# CHECK: # error: command failed with exit status: 1
12+
# CHECK: Exception occurred in test updater:
13+
# CHECK: Traceback (most recent call last):
14+
# CHECK: File {{.*}}, line {{.*}}, in {{.*}}
15+
# CHECK: update_output = test_updater(result, test)
16+
# CHECK: File "{{.*}}/should_not_run.py", line {{.*}}, in should_not_run
17+
# CHECK: raise Exception("this test updater should only run on failure")
18+
# CHECK: Exception: this test updater should only run on failure
19+
# CHECK: ********************
20+
# CHECK: PASS: pass-test-update :: pass-silent.test (2 of 5)
21+
# CHECK: PASS: pass-test-update :: pass.test (3 of 5)
22+
# CHECK: {{X}}FAIL: pass-test-update :: xfail.test (4 of 5)
23+
# CHECK: XPASS: pass-test-update :: xpass.test (5 of 5)
24+
# CHECK: ******************** TEST 'pass-test-update :: xpass.test' FAILED ********************
25+
# CHECK: Exit Code: 0
26+
# CHECK: Command Output (stdout):
27+
# CHECK: --
28+
# CHECK: # {{R}}UN: at line 2
29+
# CHECK: echo "accidentally passed"
30+
# CHECK: # executed command: echo 'accidentally passed'
31+
# CHECK: # .---command stdout------------
32+
# CHECK: # | accidentally passed
33+
# CHECK: # `-----------------------------
34+
# CHECK: ********************

0 commit comments

Comments
 (0)