mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
[lit] Add a test for the various ShTest format features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174072 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
213a789a71
commit
86aa95fc28
@ -0,0 +1,3 @@
|
||||
# Run a command that fails with error on stdout.
|
||||
#
|
||||
# RUN: cat "does-not-exist"
|
@ -0,0 +1 @@
|
||||
config.test_format = lit.formats.ShTest(execute_external=True)
|
@ -0,0 +1 @@
|
||||
# RUN: true
|
1
utils/lit/tests/Inputs/shtest-format/fail.txt
Normal file
1
utils/lit/tests/Inputs/shtest-format/fail.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: false
|
7
utils/lit/tests/Inputs/shtest-format/lit.cfg
Normal file
7
utils/lit/tests/Inputs/shtest-format/lit.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
config.name = 'shtest-format'
|
||||
config.suffixes = ['.txt']
|
||||
config.test_format = lit.formats.ShTest()
|
||||
config.test_source_root = None
|
||||
config.test_exec_root = None
|
||||
config.target_triple = 'x86_64-unknown-unknown'
|
||||
config.available_features.add('a-present-feature')
|
1
utils/lit/tests/Inputs/shtest-format/no-test-line.txt
Normal file
1
utils/lit/tests/Inputs/shtest-format/no-test-line.txt
Normal file
@ -0,0 +1 @@
|
||||
# Empty!
|
1
utils/lit/tests/Inputs/shtest-format/pass.txt
Normal file
1
utils/lit/tests/Inputs/shtest-format/pass.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
@ -0,0 +1,2 @@
|
||||
RUN: true
|
||||
REQUIRES: a-missing-feature
|
@ -0,0 +1,2 @@
|
||||
RUN: true
|
||||
REQUIRES: a-present-feature
|
@ -0,0 +1 @@
|
||||
config.unsupported = True
|
@ -0,0 +1 @@
|
||||
# RUN: true
|
2
utils/lit/tests/Inputs/shtest-format/xfail-feature.txt
Normal file
2
utils/lit/tests/Inputs/shtest-format/xfail-feature.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# RUN: false
|
||||
# XFAIL: a-present-feature
|
2
utils/lit/tests/Inputs/shtest-format/xfail-target.txt
Normal file
2
utils/lit/tests/Inputs/shtest-format/xfail-target.txt
Normal file
@ -0,0 +1,2 @@
|
||||
RUN: false
|
||||
XFAIL: x86_64
|
2
utils/lit/tests/Inputs/shtest-format/xfail.txt
Normal file
2
utils/lit/tests/Inputs/shtest-format/xfail.txt
Normal file
@ -0,0 +1,2 @@
|
||||
RUN: false
|
||||
XFAIL: *
|
2
utils/lit/tests/Inputs/shtest-format/xpass.txt
Normal file
2
utils/lit/tests/Inputs/shtest-format/xpass.txt
Normal file
@ -0,0 +1,2 @@
|
||||
RUN: true
|
||||
XFAIL: x86_64
|
43
utils/lit/tests/shtest-format.py
Normal file
43
utils/lit/tests/shtest-format.py
Normal file
@ -0,0 +1,43 @@
|
||||
# Check the various features of the ShTest format.
|
||||
#
|
||||
# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out
|
||||
# RUN: FileCheck < %t.out %s
|
||||
#
|
||||
# END.
|
||||
|
||||
# CHECK: -- Testing:
|
||||
|
||||
# CHECK: FAIL: shtest-format :: external_shell/fail.txt
|
||||
# CHECK: *** TEST 'shtest-format :: external_shell/fail.txt' FAILED ***
|
||||
# CHECK: Command Output (stderr):
|
||||
# CHECK: cat: does-not-exist: No such file or directory
|
||||
# CHECK: --
|
||||
|
||||
# CHECK: PASS: shtest-format :: external_shell/pass.txt
|
||||
|
||||
# CHECK: FAIL: shtest-format :: fail.txt
|
||||
|
||||
# CHECK: UNRESOLVED: shtest-format :: no-test-line.txt
|
||||
# CHECK: PASS: shtest-format :: pass.txt
|
||||
# CHECK: UNSUPPORTED: shtest-format :: requires-missing.txt
|
||||
# CHECK: PASS: shtest-format :: requires-present.txt
|
||||
# CHECK: UNSUPPORTED: shtest-format :: unsupported_dir/some-test.txt
|
||||
# CHECK: XFAIL: shtest-format :: xfail-feature.txt
|
||||
# CHECK: XFAIL: shtest-format :: xfail-target.txt
|
||||
# CHECK: XFAIL: shtest-format :: xfail.txt
|
||||
# CHECK: XPASS: shtest-format :: xpass.txt
|
||||
# CHECK: Testing Time
|
||||
|
||||
# CHECK: Unexpected Passing Tests (1)
|
||||
# CHECK: shtest-format :: xpass.txt
|
||||
|
||||
# CHECK: Failing Tests (2)
|
||||
# CHECK: shtest-format :: external_shell/fail.txt
|
||||
# CHECK: shtest-format :: fail.txt
|
||||
|
||||
# CHECK: Expected Passes : 3
|
||||
# CHECK: Expected Failures : 3
|
||||
# CHECK: Unsupported Tests : 2
|
||||
# CHECK: Unresolved Tests : 1
|
||||
# CHECK: Unexpected Passes : 1
|
||||
# CHECK: Unexpected Failures: 2
|
Loading…
x
Reference in New Issue
Block a user