Skip to content

Commit 871dabc

Browse files
[lldb] fix failing tests due to CI diagnostics rendering (#171685)
This patch fixes issues introduced by #171491 when running tests in CI. The shell tests expect certain characters when matching diagnostics. With #171491, those characters can either be Unicode specific characters or their ASCII equivalent. The tests were always expecting the ASCII version. This patch fixes this by using a regex to match one or the other.
1 parent e305cf2 commit 871dabc

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# RUN: echo quit | %lldb -o "dwim-print a" \
22
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1
33
# (lldb) dwim-print a
4-
# CHECK1:{{^ \^}}
4+
# CHECK1:{{^ (\^|˄)}}
55
# CHECK1: {{^ error: use of undeclared identifier 'a'}}
66
# RUN: echo quit | %lldb -o "p a" \
77
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK2
88
# (lldb) p a
9-
# CHECK2:{{^ \^}}
9+
# CHECK2:{{^ (\^|˄)}}
1010
# RUN: echo quit | %lldb -o "dwim-print -- a" \
1111
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK3
1212
# (lldb) dwim-print -- a
13-
# CHECK3:{{^ \^}}
13+
# CHECK3:{{^ (\^|˄)}}
1414
# RUN: echo quit | %lldb -o "settings set show-inline-diagnostics false" \
1515
# RUN: -o "dwim-print a" 2>&1 | FileCheck %s --check-prefix=CHECK4
1616
# CHECK4: error: <user expression 0>:1:1: use of undeclared identifier

lldb/test/Shell/Commands/command-expr-diagnostics.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# RUN: echo quit | %lldb -o "expression a+b" \
33
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1
44
# (lldb) expression a+b
5-
# CHECK1:{{^ \^ \^}}
6-
# CHECK1: {{^ | error: use of undeclared identifier 'b'}}
5+
# CHECK1:{{^ (\^|˄) (\^|˄)}}
6+
# CHECK1: {{^ (\||│) error: use of undeclared identifier 'b'}}
77
# CHECK1: {{^ error: use of undeclared identifier 'a'}}
88

99
# RUN: echo quit | %lldb -o "expr a" \
1010
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK2
1111
# (lldb) expr a
12-
# CHECK2:{{^ \^}}
12+
# CHECK2:{{^ (\^|˄)}}
1313

1414
# RUN: echo quit | %lldb -o "expr -i 0 -o 0 -- a" \
1515
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK3
1616
# (lldb) expr -i 0 -o 0 -- a
17-
# CHECK3:{{^ \^}}
17+
# CHECK3:{{^ (\^|˄)}}
1818
# CHECK3: {{^ error: use of undeclared identifier 'a'}}
1919

2020
# RUN: echo "int main(){return 0;}">%t.c
@@ -23,7 +23,7 @@
2323
# RUN: "expr --top-level -- template<typename T> T FOO(T x) { return x/2;}" -o \
2424
# RUN: "expression -- FOO(\"\")" 2>&1 | FileCheck %s --check-prefix=CHECK4
2525
# (lldb) expression -- FOO("")
26-
# CHECK4:{{^ \^}}
26+
# CHECK4:{{^ (\^|˄)}}
2727
# CHECK4: {{^ note: in instantiation of function template}}
2828
# CHECK4: error: <user expression
2929

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# RUN: echo quit | %lldb -O "log enable -x" \
22
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1
33
# (lldb) log enable -x
4-
# CHECK1:{{^ \^~}}
4+
# CHECK1:{{^ (\^|˄)(~|˜)}}
55
# CHECK1: {{^ error: unknown or ambiguous option}}
66

77
# RUN: echo quit | %lldb -O " log enable -xxxxxxx" \
88
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK2
99
# (lldb) log enable -xxxxxxx
10-
# CHECK2:{{^ \^~~~~~~~}}
10+
# CHECK2:{{^ [\^|]~~~~~~~}}
1111
# CHECK2: {{^ error: unknown or ambiguous option}}
1212
# RUN: echo quit | %lldb -O "log enable dwarf all -f dwarf.log -x" \
1313
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK3
1414
# (lldb) log enable dwarf all -f dwarf.log -x
15-
# CHECK3:{{^ \^~}}
15+
# CHECK3:{{^ [\^|]~}}
1616
# CHECK3: {{^ error: unknown or ambiguous option}}

0 commit comments

Comments
 (0)