mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-26 14:15:53 +00:00
[lit] Add a basic discovery test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
412d805841
commit
ada2de95ac
5
utils/lit/tests/Inputs/discovery/lit.cfg
Normal file
5
utils/lit/tests/Inputs/discovery/lit.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
config.name = 'top-level-suite'
|
||||
config.suffixes = ['.txt']
|
||||
config.test_format = lit.formats.ShTest()
|
||||
config.test_source_root = None
|
||||
config.test_exec_root = None
|
1
utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg
Normal file
1
utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg
Normal file
@ -0,0 +1 @@
|
||||
config.suffixes = ['.py']
|
1
utils/lit/tests/Inputs/discovery/subdir/test-three.py
Normal file
1
utils/lit/tests/Inputs/discovery/subdir/test-three.py
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
5
utils/lit/tests/Inputs/discovery/subsuite/lit.cfg
Normal file
5
utils/lit/tests/Inputs/discovery/subsuite/lit.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
config.name = 'sub-suite'
|
||||
config.suffixes = ['.txt']
|
||||
config.test_format = lit.formats.ShTest()
|
||||
config.test_source_root = None
|
||||
config.test_exec_root = None
|
1
utils/lit/tests/Inputs/discovery/subsuite/test-one.txt
Normal file
1
utils/lit/tests/Inputs/discovery/subsuite/test-one.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
1
utils/lit/tests/Inputs/discovery/subsuite/test-two.txt
Normal file
1
utils/lit/tests/Inputs/discovery/subsuite/test-two.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
1
utils/lit/tests/Inputs/discovery/test-one.txt
Normal file
1
utils/lit/tests/Inputs/discovery/test-one.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
1
utils/lit/tests/Inputs/discovery/test-two.txt
Normal file
1
utils/lit/tests/Inputs/discovery/test-two.txt
Normal file
@ -0,0 +1 @@
|
||||
# RUN: true
|
25
utils/lit/tests/discovery.py
Normal file
25
utils/lit/tests/discovery.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Check the basic discovery process, including a sub-suite.
|
||||
#
|
||||
# RUN: %{lit} %{inputs}/discovery \
|
||||
# RUN: -j 1 --debug --no-execute --show-suites -v > %t.out 2> %t.err
|
||||
# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s
|
||||
# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s
|
||||
#
|
||||
# CHECK-BASIC-ERR: loading suite config '{{.*}}/tests/Inputs/discovery/lit.cfg'
|
||||
# CHECK-BASIC-ERR: loading local config '{{.*}}/tests/Inputs/discovery/subdir/lit.local.cfg'
|
||||
# CHECK-BASIC-ERR: loading suite config '{{.*}}/tests/Inputs/discovery/subsuite/lit.cfg'
|
||||
#
|
||||
# CHECK-BASIC-OUT: -- Test Suites --
|
||||
# CHECK-BASIC-OUT: sub-suite - 2 tests
|
||||
# CHECK-BASIC-OUT: Source Root:
|
||||
# CHECK-BASIC-OUT: Exec Root :
|
||||
# CHECK-BASIC-OUT: top-level-suite - 3 tests
|
||||
# CHECK-BASIC-OUT: Source Root:
|
||||
# CHECK-BASIC-OUT: Exec Root :
|
||||
#
|
||||
# CHECK-BASIC-OUT: -- Testing: 5 tests, 1 threads --
|
||||
# CHECK-BASIC-OUT: PASS: sub-suite :: test-one
|
||||
# CHECK-BASIC-OUT: PASS: sub-suite :: test-two
|
||||
# CHECK-BASIC-OUT: PASS: top-level-suite :: subdir/test-three
|
||||
# CHECK-BASIC-OUT: PASS: top-level-suite :: test-one
|
||||
# CHECK-BASIC-OUT: PASS: top-level-suite :: test-two
|
Loading…
Reference in New Issue
Block a user