aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ScriptInterpreter/Python
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2022-08-03 22:22:40 -0600
committerDave Lee <davelee.com@gmail.com>2022-08-11 15:24:57 -0700
commit28d0c0c2c8e88d2b6599ee34c84eb58eed43a626 (patch)
treef92d06b55bc378f89906592415f6873591505bf6 /lldb/test/Shell/ScriptInterpreter/Python
parent2c2fb0c7375061147711cd21396d79faad7dfdfb (diff)
downloadllvm-28d0c0c2c8e88d2b6599ee34c84eb58eed43a626.zip
llvm-28d0c0c2c8e88d2b6599ee34c84eb58eed43a626.tar.gz
llvm-28d0c0c2c8e88d2b6599ee34c84eb58eed43a626.tar.bz2
[lldb] Tidy some regex in crashlog.py (NFC)
A spiritual follow up to D131032. I noticed some regex could be simplified. This does some of the following: 1. Removes unused capture groups 2. Uses non-capturing `(?:...)` groups where grouping is needed but capturing isn't 3. Removes trailing `.*` 4. Uses `\d` over `[0-9]` 5. Uses raw strings 6. Uses `{N,}` to indicate N-or-more Also improves the call site of a `re.findall`. Differential Revision: https://reviews.llvm.org/D131305
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test7
1 files changed, 0 insertions, 7 deletions
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test
index 7251d85..af3f9ad 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test
@@ -52,7 +52,6 @@ images = [
# CHECK: MyFramework Plus.dylib
# CHECK: ({{.*}}
# CHECK: 1.11 - MyFramework 1.11
-# CHECK: <{{.*}}
# CHECK: 01234
# CHECK: /tmp/MyFramework Plus.dylib
@@ -62,7 +61,6 @@ images = [
# CHECK: MyFramework-dev.dylib
# CHECK: ({{.*}}
# CHECK: 1.0.0svn - 1.0.0svn
-# CHECK: <{{.*}}
# CHECK: 01234
# CHECK: /MyFramework-dev.dylib
@@ -73,7 +71,6 @@ images = [
# CHECK: ({{.*}}
# CHECK: 400.9.4
# CHECK: None
-# CHECK: None
# CHECK: /usr/lib/libc++.1.dylib
"0x1047b8000 - 0x10481ffff dyld arm64e <cfa789d10da63f9a8996daf84ed9d04f> /usr/lib/dyld"
@@ -82,7 +79,6 @@ images = [
# CHECK: dyld
# CHECK: {{.*}}
# CHECK: arm64e
-# CHECK: <{{.*}}
# CHECK: cfa789d10da63f9a8996daf84ed9d04f
# CHECK: /usr/lib/dyld
]
@@ -101,9 +97,6 @@ frames = [
"2 MyApp Pro arm64 0x000000019b0db3a8 foo + 72",
# CHECK: 2
# CHECK: MyApp Pro
-# CHECK: a
-# CHECK: arm64
-# CHECK: a
# CHECK: 0x000000019b0db3a8
# CHECK: foo + 72
"3 He 0x1 0x000000019b0db3a8 foo + 72"