diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 16:38:47 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 16:38:47 +0000 |
| commit | 22314179f0660c172514b397060fd8f34b586e82 (patch) | |
| tree | afb3f04cd285733772ffceec4ccf3d8539dca91c /lldb/lit/Driver | |
| parent | df14bd315db94d286c0c75b4b6ee5d760f311399 (diff) | |
| download | bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.tar.gz bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.zip | |
[test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise
the SB API though dotest.py and what we currently call lit tests. The
later is rather confusing as we're now using lit as the driver for all
three types of tests. As most of this grew organically, the directory
structure in the LLDB repository doesn't really make this clear.
The 'lit' tests are part of the root and among these tests there's a
Unit and Suite folder for the unit and dotest-tests. This layout makes
it impossible to run just the lit tests.
This patch changes the directory layout to match the 3 testing
strategies, each with their own directory and their own configuration
file. This means there are now 3 directories under lit with 3
corresponding targets:
- API (check-lldb-api): Test exercising the SB API.
- Shell (check-lldb-shell): Test exercising command line utilities.
- Unit (check-lldb-unit): Unit tests.
Finally, there's still the `check-lldb` target that runs all three test
suites.
Finally, this also renames the lit folder to `test` to match the LLVM
repository layout.
Differential revision: https://reviews.llvm.org/D68606
llvm-svn: 374184
Diffstat (limited to 'lldb/lit/Driver')
| -rw-r--r-- | lldb/lit/Driver/Inputs/.lldbinit | 2 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/Print0.in | 1 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/Print2.in | 1 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/Print4.in | 1 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/Print6.in | 1 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/convenience.in | 9 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/hello.c | 3 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/hello.cpp | 11 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/process_attach_pid.in | 2 | ||||
| -rw-r--r-- | lldb/lit/Driver/Inputs/syntax_error.py | 1 | ||||
| -rw-r--r-- | lldb/lit/Driver/LocalLLDBInit.test | 15 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestCommands.test | 41 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestConvenienceVariables.test | 23 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestCore.test | 2 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestFile.test | 2 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestNoUseColor.test | 4 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestProcessAttach.test | 2 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestRepl.test | 7 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestSingleQuote.test | 6 | ||||
| -rw-r--r-- | lldb/lit/Driver/TestTarget.test | 7 |
20 files changed, 0 insertions, 141 deletions
diff --git a/lldb/lit/Driver/Inputs/.lldbinit b/lldb/lit/Driver/Inputs/.lldbinit deleted file mode 100644 index 7628917d324..00000000000 --- a/lldb/lit/Driver/Inputs/.lldbinit +++ /dev/null @@ -1,2 +0,0 @@ -settings set -f frame-format "bogus" -command script import syntax_error.py diff --git a/lldb/lit/Driver/Inputs/Print0.in b/lldb/lit/Driver/Inputs/Print0.in deleted file mode 100644 index cb545cc15ab..00000000000 --- a/lldb/lit/Driver/Inputs/Print0.in +++ /dev/null @@ -1 +0,0 @@ -expr 0 diff --git a/lldb/lit/Driver/Inputs/Print2.in b/lldb/lit/Driver/Inputs/Print2.in deleted file mode 100644 index f51389a02a0..00000000000 --- a/lldb/lit/Driver/Inputs/Print2.in +++ /dev/null @@ -1 +0,0 @@ -expr 2 diff --git a/lldb/lit/Driver/Inputs/Print4.in b/lldb/lit/Driver/Inputs/Print4.in deleted file mode 100644 index a2d49f30b99..00000000000 --- a/lldb/lit/Driver/Inputs/Print4.in +++ /dev/null @@ -1 +0,0 @@ -expr 4 diff --git a/lldb/lit/Driver/Inputs/Print6.in b/lldb/lit/Driver/Inputs/Print6.in deleted file mode 100644 index dee6212b87c..00000000000 --- a/lldb/lit/Driver/Inputs/Print6.in +++ /dev/null @@ -1 +0,0 @@ -expr 6 diff --git a/lldb/lit/Driver/Inputs/convenience.in b/lldb/lit/Driver/Inputs/convenience.in deleted file mode 100644 index 6d5603c4351..00000000000 --- a/lldb/lit/Driver/Inputs/convenience.in +++ /dev/null @@ -1,9 +0,0 @@ -breakpoint set -f hello.cpp -p Hello -run -script print(lldb.debugger) -script print(lldb.target) -script print(lldb.process) -script print(lldb.thread.GetStopDescription(100)) -script lldb.frame.GetLineEntry().GetLine() -script lldb.frame.GetLineEntry().GetFileSpec().GetFilename() -script lldb.frame.GetFunctionName() diff --git a/lldb/lit/Driver/Inputs/hello.c b/lldb/lit/Driver/Inputs/hello.c deleted file mode 100644 index 03b2213bb9a..00000000000 --- a/lldb/lit/Driver/Inputs/hello.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/lldb/lit/Driver/Inputs/hello.cpp b/lldb/lit/Driver/Inputs/hello.cpp deleted file mode 100644 index 1ec0677aeb2..00000000000 --- a/lldb/lit/Driver/Inputs/hello.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// The build.py script always runs the compiler in C++ mode, regardless of the -// file extension. This results in mangled names presented to the linker which -// in turn cannot find the printf symbol. -extern "C" { -int printf(const char *format, ...); - -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} -} diff --git a/lldb/lit/Driver/Inputs/process_attach_pid.in b/lldb/lit/Driver/Inputs/process_attach_pid.in deleted file mode 100644 index 3d17ceee99e..00000000000 --- a/lldb/lit/Driver/Inputs/process_attach_pid.in +++ /dev/null @@ -1,2 +0,0 @@ -process attach --pid - diff --git a/lldb/lit/Driver/Inputs/syntax_error.py b/lldb/lit/Driver/Inputs/syntax_error.py deleted file mode 100644 index 587b8043dec..00000000000 --- a/lldb/lit/Driver/Inputs/syntax_error.py +++ /dev/null @@ -1 +0,0 @@ -prlnt("foo") diff --git a/lldb/lit/Driver/LocalLLDBInit.test b/lldb/lit/Driver/LocalLLDBInit.test deleted file mode 100644 index 69b7781415a..00000000000 --- a/lldb/lit/Driver/LocalLLDBInit.test +++ /dev/null @@ -1,15 +0,0 @@ -# REQUIRES: python -# RUN: mkdir -p %t.root -# RUN: mkdir -p %t.home -# RUN: cp %S/Inputs/.lldbinit %t.root -# RUN: cp %S/Inputs/syntax_error.py %t.root -# RUN: cd %t.root -# RUN: env HOME=%t.home %lldb-init -o 'settings show frame-format' 2>&1 | FileCheck %s --check-prefix=WARNINIT --check-prefix=CHECK -# RUN: env HOME=%t.home %lldb-init -local-lldbinit -o 'settings show frame-format' 2>&1 | FileCheck %s --check-prefix=ALLOWINIT --check-prefix=NOINIT -# RUN: %lldb -o 'settings show frame-format' 2>&1 | FileCheck %s --check-prefix=NOINIT --check-prefix=CHECK - -# WARNINIT: There is a .lldbinit file in the current directory which is not being read. -# NOINIT-NOT: There is a .lldbinit file in the current directory which is not being read. -# CHECK-NOT: bogus -# ALLOWINIT: name 'prlnt' is not defined -# ALLOWINIT: bogus diff --git a/lldb/lit/Driver/TestCommands.test b/lldb/lit/Driver/TestCommands.test deleted file mode 100644 index 3589abb8278..00000000000 --- a/lldb/lit/Driver/TestCommands.test +++ /dev/null @@ -1,41 +0,0 @@ -# RUN: %lldb -x -b \ -# RUN: -S %S/Inputs/Print0.in \ -# RUN: -O 'expr 1' \ -# RUN: -S %S/Inputs/Print2.in \ -# RUN: -O 'expr 3' \ -# RUN: -s %S/Inputs/Print4.in \ -# RUN: -o 'expr 5' \ -# RUN: -s %S/Inputs/Print6.in \ -# RUN: -o 'expr 7' \ -# RUN: | FileCheck %s -# -# RUN: %lldb -x -b \ -# RUN: -s %S/Inputs/Print4.in \ -# RUN: -o 'expr 5' \ -# RUN: -s %S/Inputs/Print6.in \ -# RUN: -o 'expr 7' \ -# RUN: -S %S/Inputs/Print0.in \ -# RUN: -O 'expr 1' \ -# RUN: -S %S/Inputs/Print2.in \ -# RUN: -O 'expr 3' \ -# RUN: | FileCheck %s -# -# RUN: %lldb -x -b \ -# RUN: -s %S/Inputs/Print4.in \ -# RUN: -S %S/Inputs/Print0.in \ -# RUN: -o 'expr 5' \ -# RUN: -O 'expr 1' \ -# RUN: -s %S/Inputs/Print6.in \ -# RUN: -S %S/Inputs/Print2.in \ -# RUN: -o 'expr 7' \ -# RUN: -O 'expr 3' \ -# RUN: | FileCheck %s - -# CHECK: (int) $0 = 0 -# CHECK: (int) $1 = 1 -# CHECK: (int) $2 = 2 -# CHECK: (int) $3 = 3 -# CHECK: (int) $4 = 4 -# CHECK: (int) $5 = 5 -# CHECK: (int) $6 = 6 -# CHECK: (int) $7 = 7 diff --git a/lldb/lit/Driver/TestConvenienceVariables.test b/lldb/lit/Driver/TestConvenienceVariables.test deleted file mode 100644 index a7b6faa34cb..00000000000 --- a/lldb/lit/Driver/TestConvenienceVariables.test +++ /dev/null @@ -1,23 +0,0 @@ -REQUIRES: python -RUN: %build %p/Inputs/hello.cpp -o %t -RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s - -script print(lldb.debugger) - -CHECK: stop reason = breakpoint 1.1 -CHECK: Debugger (instance: {{.*}}, id: {{[0-9]+}}) -CHECK: script print(lldb.target) -CHECK: TestConvenienceVariables.test -CHECK: script print(lldb.process) -CHECK: SBProcess: pid = {{[0-9]+}}, -CHECK-SAME: state = stopped, -CHECK-SAME: threads = {{[0-9]+}}, -CHECK-SAME: executable = TestConvenienceVariables.test -CHECK: script print(lldb.thread.GetStopDescription(100)) -CHECK: breakpoint 1.1 -CHECK: script lldb.frame.GetLineEntry().GetLine() -CHECK: 8 -CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename() -CHECK: hello.c -CHECK: script lldb.frame.GetFunctionName() -CHECK: main diff --git a/lldb/lit/Driver/TestCore.test b/lldb/lit/Driver/TestCore.test deleted file mode 100644 index cca8171da63..00000000000 --- a/lldb/lit/Driver/TestCore.test +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: not %lldb -c /bogus/path 2>&1 | FileCheck %s -# CHECK: error: file specified in --core (-c) option doesn't exist diff --git a/lldb/lit/Driver/TestFile.test b/lldb/lit/Driver/TestFile.test deleted file mode 100644 index 0e80594aeb1..00000000000 --- a/lldb/lit/Driver/TestFile.test +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: not %lldb -f /bogus/path 2>&1 | FileCheck %s -# CHECK: error: file specified in --file (-f) option doesn't exist diff --git a/lldb/lit/Driver/TestNoUseColor.test b/lldb/lit/Driver/TestNoUseColor.test deleted file mode 100644 index 62735301fca..00000000000 --- a/lldb/lit/Driver/TestNoUseColor.test +++ /dev/null @@ -1,4 +0,0 @@ -# RUN: %lldb --no-use-color -s %s | FileCheck %s -settings show use-color -# CHECK: use-color (boolean) = false -q diff --git a/lldb/lit/Driver/TestProcessAttach.test b/lldb/lit/Driver/TestProcessAttach.test deleted file mode 100644 index 4e24ebb161b..00000000000 --- a/lldb/lit/Driver/TestProcessAttach.test +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: %lldb -x -b -S %S/Inputs/process_attach_pid.in 2>&1 | FileCheck %s -# CHECK: last option requires an argument diff --git a/lldb/lit/Driver/TestRepl.test b/lldb/lit/Driver/TestRepl.test deleted file mode 100644 index 083863985a1..00000000000 --- a/lldb/lit/Driver/TestRepl.test +++ /dev/null @@ -1,7 +0,0 @@ -# RUN: echo ':quit' | %lldb -x --repl -O 'expr 42' -S %S/Inputs/Print2.in -o 'expr 999999' -s %s 2>&1 | FileCheck %s -# CHECK: {{w}}arning: commands specified to run after file load (via -o or -s) are ignored in REPL mode -# CHECK: (int) $0 = 42 -# CHECK: (int) $1 = 2 -# CHECK-NOT: 999999 - -expr 999999 diff --git a/lldb/lit/Driver/TestSingleQuote.test b/lldb/lit/Driver/TestSingleQuote.test deleted file mode 100644 index 0ba4a1456fa..00000000000 --- a/lldb/lit/Driver/TestSingleQuote.test +++ /dev/null @@ -1,6 +0,0 @@ -# Make sure lldb can handle filenames with single quotes in them. -# RUN: %clang %p/Inputs/hello.c -g -o "%t-'pat" -# RUN: %lldb -s %s "%t-'pat" | FileCheck %s - -br set -p return -# CHECK: Breakpoint 1: where = TestSingleQuote.test.tmp-'pat`main diff --git a/lldb/lit/Driver/TestTarget.test b/lldb/lit/Driver/TestTarget.test deleted file mode 100644 index fcf7f776bbc..00000000000 --- a/lldb/lit/Driver/TestTarget.test +++ /dev/null @@ -1,7 +0,0 @@ -# Make sure lldb resolves the target path. -# RUN: mkdir -p %t/foo -# RUN: cd %t/foo -# RUN: %clang %p/Inputs/hello.c -g -o a.out -# RUN: %lldb -b a.out | FileCheck %s - -# CHECK: Current executable set to '{{.*}}foo{{[/\\\\]+}}a.out' |

