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/test/Shell/Python/crashlog.test | |
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/test/Shell/Python/crashlog.test')
-rw-r--r-- | lldb/test/Shell/Python/crashlog.test | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/lldb/test/Shell/Python/crashlog.test b/lldb/test/Shell/Python/crashlog.test new file mode 100644 index 00000000000..24d72eae41f --- /dev/null +++ b/lldb/test/Shell/Python/crashlog.test @@ -0,0 +1,99 @@ +# -*- python -*- +# REQUIRES: system-darwin +# RUN: cd %S/../../../examples/python && cat %s | %lldb | FileCheck %s +# CHECK-LABEL: {{S}}KIP BEYOND CHECKS +script +import crashlog +cl = crashlog.CrashLog +images = [ +"0x10b60b000 - 0x10f707fff com.apple.LLDB.framework (1.1000.11.38.2 - 1000.11.38.2) <96E36F5C-1A83-39A1-8713-5FDD9701C3F1> /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB", +# CHECK: 0x10b60b000 +# CHECK: 0x10f707fff +# CHECK: com.apple.LLDB.framework +# CHECK: 96E36F5C-1A83-39A1-8713-5FDD9701C3F1 +# CHECK: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB + +"0x104591000 - 0x1055cfff7 +llvm-dwarfdump (0) <B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3> /Users/USER 1/Documents/*/llvm-dwarfdump", +# CHECK: 0x104591000 +# CHECK: 0x1055cfff7 +# CHECK: llvm-dwarfdump +# CHECK: (0) +# CHECK: B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3 +# CHECK: /Users/USER 1/Documents/*/llvm-dwarfdump + +"0x7fff63f20000 - 0x7fff63f77ff7 libc++.1.dylib (400.9.4) <D4AB366F-48A9-3C7D-91BD-41198F69DD57> /usr/lib/libc++.1.dylib", +# CHECK: 0x7fff63f20000 +# CHECK: 0x7fff63f77ff7 +# CHECK: libc++.1.dylib +# CHECK: (400.9.4) +# CHECK: D4AB366F-48A9-3C7D-91BD-41198F69DD57 +# CHECK: /usr/lib/libc++.1.dylib + +"0x1111111 - 0x22222 +MyApp Pro arm64 <01234> /tmp/MyApp Pro.app/MyApp Pro", +# CHECK: 0x1111111 +# CHECK: 0x22222 +# CHECK: MyApp Pro arm64 +# CHECK: None +# CHECK: 01234 +# CHECK: /tmp/MyApp Pro.app/MyApp Pro + +"0x1111111 - 0x22222 +MyApp Pro (0) <01234> /tmp/MyApp Pro.app/MyApp Pro", +# CHECK: 0x1111111 +# CHECK: 0x22222 +# CHECK: MyApp Pro +# CHECK: (0) +# CHECK: 01234 +# CHECK: /tmp/MyApp Pro.app/MyApp Pro + +"0x7fff63f20000 - 0x7fff63f77ff7 libc++.1.dylib (400.9.4) /usr/lib/libc++.1.dylib" +# CHECK: 0x7fff63f20000 +# CHECK: 0x7fff63f77ff7 +# CHECK: libc++.1.dylib +# CHECK: (400.9.4) +# CHECK: None +# CHECK: /usr/lib/libc++.1.dylib +] +# CHECK-LABEL: FRAMES +frames = [ +"0 libsystem_kernel.dylib 0x00007fff684b78a6 read + 10", +# CHECK: 0 +# CHECK: libsystem_kernel.dylib +# CHECK: 0x00007fff684b78a6 +# CHECK: read + 10 +"1 com.apple.LLDB.framework 0x000000010f7954af lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105", +# CHECK: 1 +# CHECK: com.apple.LLDB.framework +# CHECK: 0x000000010f7954af +# CHECK: lldb_private{{.*}} + 105 +"2 MyApp Pro arm64 0x000000019b0db3a8 foo + 72", +# CHECK: 2 +# CHECK: MyApp Pro arm64 +# CHECK: 0x000000019b0db3a8 +# CHECK: foo + 72 +"3 He 0x1 0x000000019b0db3a8 foo + 72" +# CHECK: 3 +# CHECK: He 0x1 +# CHECK: 0x000000019b0db3a8 +# CHECK: foo + 72 +] + + +# Avoid matching the text inside the input. +print("SKIP BEYOND CHECKS") +for image in images: + print('"%s"'%image) + print("--------------") + match = cl.image_regex_uuid.search(image) + for group in match.groups(): + print(group) + +print("FRAMES") +for frame in frames: + print('"%s"'%frame) + print("--------------") + match = cl.frame_regex.search(frame) + for group in match.groups(): + print(group) + +exit() +quit |