[lit] Lift XFAIL handling to core infrastructure.
[oota-llvm.git] / utils / lit / tests / shtest-format.py
1 # Check the various features of the ShTest format.
2 #
3 # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out
4 # RUN: FileCheck < %t.out %s
5 #
6 # END.
7
8 # CHECK: -- Testing:
9
10 # CHECK: FAIL: shtest-format :: external_shell/fail.txt
11 # CHECK-NEXT: *** TEST 'shtest-format :: external_shell/fail.txt' FAILED ***
12 # CHECK: Command Output (stdout):
13 # CHECK-NEXT: --
14 # CHECK-NEXT: line 1: failed test output on stdout
15 # CHECK-NEXT: line 2: failed test output on stdout
16 # CHECK: Command Output (stderr):
17 # CHECK-NEXT: --
18 # CHECK-NEXT: cat: does-not-exist: No such file or directory
19 # CHECK: --
20
21 # CHECK: FAIL: shtest-format :: external_shell/fail_with_bad_encoding.txt
22 # CHECK-NEXT: *** TEST 'shtest-format :: external_shell/fail_with_bad_encoding.txt' FAILED ***
23 # CHECK: Command Output (stdout):
24 # CHECK-NEXT: --
25 # CHECK-NEXT: a line with bad encoding:
26 # CHECK: --
27
28 # CHECK: PASS: shtest-format :: external_shell/pass.txt
29
30 # CHECK: FAIL: shtest-format :: fail.txt
31 # CHECK-NEXT: *** TEST 'shtest-format :: fail.txt' FAILED ***
32 # CHECK-NEXT: Script:
33 # CHECK-NEXT: --
34 # CHECK-NEXT: printf "line 1
35 # CHECK-NEXT: false
36 # CHECK-NEXT: --
37 # CHECK-NEXT: Exit Code: 1
38 #
39 # CHECK: Command Output (stdout):
40 # CHECK-NEXT: --
41 # CHECK-NEXT: Command 0: "printf"
42 # CHECK-NEXT: Command 0 Result: 0
43 # CHECK-NEXT: Command 0 Output:
44 # CHECK-NEXT: line 1: failed test output on stdout
45 # CHECK-NEXT: line 2: failed test output on stdout
46
47 # CHECK: UNRESOLVED: shtest-format :: no-test-line.txt
48 # CHECK: PASS: shtest-format :: pass.txt
49 # CHECK: UNSUPPORTED: shtest-format :: requires-missing.txt
50 # CHECK: PASS: shtest-format :: requires-present.txt
51 # CHECK: UNSUPPORTED: shtest-format :: unsupported_dir/some-test.txt
52 # CHECK: XFAIL: shtest-format :: xfail-feature.txt
53 # CHECK: XFAIL: shtest-format :: xfail-target.txt
54 # CHECK: XFAIL: shtest-format :: xfail.txt
55 # CHECK: XPASS: shtest-format :: xpass.txt
56 # CHECK-NEXT: *** TEST 'shtest-format :: xpass.txt' FAILED ***
57 # CHECK-NEXT: Script
58 # CHECK-NEXT: --
59 # CHECK-NEXT: true
60 # CHECK-NEXT: --
61 # CHECK: Testing Time
62
63 # CHECK: Unexpected Passing Tests (1)
64 # CHECK: shtest-format :: xpass.txt
65
66 # CHECK: Failing Tests (3)
67 # CHECK: shtest-format :: external_shell/fail.txt
68 # CHECK: shtest-format :: external_shell/fail_with_bad_encoding.txt
69 # CHECK: shtest-format :: fail.txt
70
71 # CHECK: Expected Passes    : 3
72 # CHECK: Expected Failures  : 3
73 # CHECK: Unsupported Tests  : 2
74 # CHECK: Unresolved Tests   : 1
75 # CHECK: Unexpected Passes  : 1
76 # CHECK: Unexpected Failures: 3