diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-11-02 20:29:32 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-11-03 09:04:35 -0800 |
| commit | 4b846820445ef33a099a19b5df983ed2f9d6e067 (patch) | |
| tree | 872693b1a3c43009d61af074db8aa647116bd574 /lldb/test/Shell/ScriptInterpreter/Python | |
| parent | af9bf14e6b08974cb5f80f12a52ece3b3fe0445c (diff) | |
| download | llvm-4b846820445ef33a099a19b5df983ed2f9d6e067.zip llvm-4b846820445ef33a099a19b5df983ed2f9d6e067.tar.gz llvm-4b846820445ef33a099a19b5df983ed2f9d6e067.tar.bz2 | |
[crashlog] Move crash log parsing into its own class
Move crash log parsing out of the CrashLog class and into its own class
and add more tests.
Differential revision: https://reviews.llvm.org/D90664
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
| -rw-r--r-- | lldb/test/Shell/ScriptInterpreter/Python/Crashlog/crashlog.test (renamed from lldb/test/Shell/ScriptInterpreter/Python/crashlog.test) | 13 | ||||
| -rw-r--r-- | lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive.test | 8 | ||||
| -rw-r--r-- | lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg | 5 |
3 files changed, 19 insertions, 7 deletions
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/crashlog.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/crashlog.test index 293d3451..6ac9392 100644 --- a/lldb/test/Shell/ScriptInterpreter/Python/crashlog.test +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/crashlog.test @@ -1,12 +1,11 @@ # -*- python -*- -# REQUIRES: system-darwin -# UNSUPPORTED: lldb-repro -# DEBUG: cd %S/../../../../examples/python && cat %s | %lldb && false -# RUN: cd %S/../../../../examples/python && cat %s | %lldb | FileCheck %s +# DEBUG: cd %S/../../../../../examples/python && cat %s | %lldb && false +# RUN: cd %S/../../../../../examples/python && cat %s | %lldb | FileCheck %s # CHECK-LABEL: {{S}}KIP BEYOND CHECKS script import crashlog -cl = crashlog.CrashLog +crash_log_parser = crashlog.CrashLogParser +crash_log = 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 @@ -120,7 +119,7 @@ print("SKIP BEYOND CHECKS") for image in images: print('"%s"'%image) print("--------------") - match = cl.image_regex_uuid.search(image) + match = crash_log_parser.image_regex_uuid.search(image) for group in match.groups(): print(group) @@ -128,7 +127,7 @@ print("FRAMES") for frame in frames: print('"%s"'%frame) print("--------------") - match = cl.frame_regex.search(frame) + match = crash_log_parser.frame_regex.search(frame) for group in match.groups(): print(group) diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive.test new file mode 100644 index 0000000..2690b7f --- /dev/null +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive.test @@ -0,0 +1,8 @@ +# RUN: echo "quit" | %S/../../../../../examples/python/crashlog.py -i %s 2>&1 | FileCheck %s +# CHECK: 1 crash logs are loaded: +# CHECK: [0] = {{.*}}interactive.test +# CHECK: Interactive crashlogs prompt, type "help" to see a list of supported commands. + +Binary Images: + 0x10ab87000 - 0x10abdafff +lldb (10.0.0) <87BD1384-BAE9-3625-A838-9D241CBAEF87> /Volumes/VOLUME/*/lldb + 0x10ac45000 - 0x10ae94fff com.apple.python3 (3.8.2 - 3.8.2) <20BC3FC4-CAAD-3002-ACDF-423A3188F24C> /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Python3 diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg new file mode 100644 index 0000000..4170696 --- /dev/null +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg @@ -0,0 +1,5 @@ +if 'system-darwin' not in config.available_features: + config.unsupported = True + +if 'lldb-repro' in config.available_features: + config.unsupported = True |
