Skip to content

Commit 7e46723

Browse files
Auto merge of #147799 - Enselic:slash-slash-at-debuginfo-tests, r=<try>
compiletest: Use `//@` prefixes also for debuginfo test directives try-job: aarch64-apple
2 parents c5dabe8 + 19de8a2 commit 7e46723

File tree

162 files changed

+6876
-6867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+6876
-6867
lines changed

src/bootstrap/mk/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ TEST_SET2 := --skip=tests --skip=coverage-map --skip=coverage-run --skip=library
109109

110110
# this intentionally doesn't use `$(BOOTSTRAP)` so we can test the shebang on Windows
111111
ci-msvc-py:
112-
$(Q)$(CFG_SRC_DIR)/x.py test --stage 2 $(TEST_SET1)
112+
$(Q)$(CFG_SRC_DIR)/x.py test --stage 2 tests\debuginfo
113113
ci-msvc-ps1:
114114
$(Q)$(CFG_SRC_DIR)/x.ps1 test --stage 2 $(TEST_SET2)
115115
ci-msvc: ci-msvc-py ci-msvc-ps1

src/tools/compiletest/src/directives/directive_names.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
1212
"build-aux-docs",
1313
"build-fail",
1414
"build-pass",
15+
"cdb-check",
16+
"cdb-command",
1517
"check-fail",
1618
"check-pass",
1719
"check-run-results",
@@ -33,6 +35,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
3335
"filecheck-flags",
3436
"forbid-output",
3537
"force-host",
38+
"gdb-check",
39+
"gdb-command",
3640
"ignore-16bit",
3741
"ignore-32bit",
3842
"ignore-64bit",
@@ -133,6 +137,8 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
133137
"ignore-x86_64-unknown-linux-gnu",
134138
"incremental",
135139
"known-bug",
140+
"lldb-check",
141+
"lldb-command",
136142
"llvm-cov-flags",
137143
"max-llvm-major-version",
138144
"min-cdb-version",

src/tools/compiletest/src/runtest/debugger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl DebuggerCommands {
3838
continue;
3939
}
4040

41-
let Some(line) = line.trim_start().strip_prefix("//").map(str::trim_start) else {
41+
let Some(line) = line.trim_start().strip_prefix("//@").map(str::trim_start) else {
4242
continue;
4343
};
4444

src/tools/tidy/src/style.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
6767
"//@ compile-flags",
6868
"// error-pattern",
6969
"//@ error-pattern",
70-
"// gdb",
71-
"// lldb",
72-
"// cdb",
70+
"//@ gdb",
71+
"//@ lldb",
72+
"//@ cdb",
7373
"//@ normalize-stderr",
7474
];
7575

tests/debuginfo/associated-types.rs

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,70 @@
33
//@ ignore-backends: gcc
44

55
// === GDB TESTS ===================================================================================
6-
// gdb-command:run
7-
8-
// gdb-command:print arg
9-
// gdb-check:$1 = associated_types::Struct<i32> {b: -1, b1: 0}
10-
// gdb-command:continue
11-
12-
// gdb-command:print inferred
13-
// gdb-check:$2 = 1
14-
// gdb-command:print explicitly
15-
// gdb-check:$3 = 1
16-
// gdb-command:continue
17-
18-
// gdb-command:print arg
19-
// gdb-check:$4 = 2
20-
// gdb-command:continue
21-
22-
// gdb-command:print arg
23-
// gdb-check:$5 = (4, 5)
24-
// gdb-command:continue
25-
26-
// gdb-command:print a
27-
// gdb-check:$6 = 6
28-
// gdb-command:print b
29-
// gdb-check:$7 = 7
30-
// gdb-command:continue
31-
32-
// gdb-command:print a
33-
// gdb-check:$8 = 8
34-
// gdb-command:print b
35-
// gdb-check:$9 = 9
36-
// gdb-command:continue
6+
//@ gdb-command:run
7+
8+
//@ gdb-command:print arg
9+
//@ gdb-check:$1 = associated_types::Struct<i32> {b: -1, b1: 0}
10+
//@ gdb-command:continue
11+
12+
//@ gdb-command:print inferred
13+
//@ gdb-check:$2 = 1
14+
//@ gdb-command:print explicitly
15+
//@ gdb-check:$3 = 1
16+
//@ gdb-command:continue
17+
18+
//@ gdb-command:print arg
19+
//@ gdb-check:$4 = 2
20+
//@ gdb-command:continue
21+
22+
//@ gdb-command:print arg
23+
//@ gdb-check:$5 = (4, 5)
24+
//@ gdb-command:continue
25+
26+
//@ gdb-command:print a
27+
//@ gdb-check:$6 = 6
28+
//@ gdb-command:print b
29+
//@ gdb-check:$7 = 7
30+
//@ gdb-command:continue
31+
32+
//@ gdb-command:print a
33+
//@ gdb-check:$8 = 8
34+
//@ gdb-command:print b
35+
//@ gdb-check:$9 = 9
36+
//@ gdb-command:continue
3737

3838
// === LLDB TESTS ==================================================================================
39-
// lldb-command:run
40-
41-
// lldb-command:v arg
42-
// lldb-check:[...] { b = -1 b1 = 0 }
43-
// lldb-command:continue
44-
45-
// lldb-command:v inferred
46-
// lldb-check:[...] 1
47-
// lldb-command:v explicitly
48-
// lldb-check:[...] 1
49-
// lldb-command:continue
50-
51-
// lldb-command:v arg
52-
// lldb-check:[...] 2
53-
// lldb-command:continue
54-
55-
// lldb-command:v arg
56-
// lldb-check:[...] { 0 = 4 1 = 5 }
57-
// lldb-command:continue
58-
59-
// lldb-command:v a
60-
// lldb-check:[...] 6
61-
// lldb-command:v b
62-
// lldb-check:[...] 7
63-
// lldb-command:continue
64-
65-
// lldb-command:v a
66-
// lldb-check:[...] 8
67-
// lldb-command:v b
68-
// lldb-check:[...] 9
69-
// lldb-command:continue
39+
//@ lldb-command:run
40+
41+
//@ lldb-command:v arg
42+
//@ lldb-check:[...] { b = -1 b1 = 0 }
43+
//@ lldb-command:continue
44+
45+
//@ lldb-command:v inferred
46+
//@ lldb-check:[...] 1
47+
//@ lldb-command:v explicitly
48+
//@ lldb-check:[...] 1
49+
//@ lldb-command:continue
50+
51+
//@ lldb-command:v arg
52+
//@ lldb-check:[...] 2
53+
//@ lldb-command:continue
54+
55+
//@ lldb-command:v arg
56+
//@ lldb-check:[...] { 0 = 4 1 = 5 }
57+
//@ lldb-command:continue
58+
59+
//@ lldb-command:v a
60+
//@ lldb-check:[...] 6
61+
//@ lldb-command:v b
62+
//@ lldb-check:[...] 7
63+
//@ lldb-command:continue
64+
65+
//@ lldb-command:v a
66+
//@ lldb-check:[...] 8
67+
//@ lldb-command:v b
68+
//@ lldb-check:[...] 9
69+
//@ lldb-command:continue
7070

7171
#![allow(unused_variables)]
7272
#![allow(dead_code)]

tests/debuginfo/basic-stepping.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
//@ compile-flags: -g
99
//@ ignore-backends: gcc
1010

11-
// gdb-command: run
11+
//@ gdb-command: run
1212
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
1313
// FIXME(#97083): Right now the first breakable line is:
14-
// gdb-check: let mut c = 27;
15-
// gdb-command: next
16-
// gdb-check: let d = c = 99;
17-
// gdb-command: next
14+
//@ gdb-check: let mut c = 27;
15+
//@ gdb-command: next
16+
//@ gdb-check: let d = c = 99;
17+
//@ gdb-command: next
1818
// FIXME(#33013): gdb-check: let e = "hi bob";
1919
// FIXME(#33013): gdb-command: next
2020
// FIXME(#33013): gdb-check: let f = b"hi bob";
@@ -23,15 +23,15 @@
2323
// FIXME(#33013): gdb-command: next
2424
// FIXME(#33013): gdb-check: let h = ["whatever"; 8];
2525
// FIXME(#33013): gdb-command: next
26-
// gdb-check: let i = [1,2,3,4];
27-
// gdb-command: next
28-
// gdb-check: let j = (23, "hi");
29-
// gdb-command: next
30-
// gdb-check: let k = 2..3;
31-
// gdb-command: next
32-
// gdb-check: let l = &i[k];
33-
// gdb-command: next
34-
// gdb-check: let m: *const() = &a;
26+
//@ gdb-check: let i = [1,2,3,4];
27+
//@ gdb-command: next
28+
//@ gdb-check: let j = (23, "hi");
29+
//@ gdb-command: next
30+
//@ gdb-check: let k = 2..3;
31+
//@ gdb-command: next
32+
//@ gdb-check: let l = &i[k];
33+
//@ gdb-command: next
34+
//@ gdb-check: let m: *const() = &a;
3535

3636
fn main () {
3737
let a = (); // #break

tests/debuginfo/basic-types-globals-metadata.rs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@
22
//@ disable-gdb-pretty-printers
33
//@ ignore-backends: gcc
44

5-
// gdb-command:run
6-
// gdb-command:whatis basic_types_globals_metadata::B
7-
// gdb-check:type = bool
8-
// gdb-command:whatis basic_types_globals_metadata::I
9-
// gdb-check:type = isize
10-
// gdb-command:whatis basic_types_globals_metadata::C
11-
// gdb-check:type = char
12-
// gdb-command:whatis basic_types_globals_metadata::I8
13-
// gdb-check:type = i8
14-
// gdb-command:whatis basic_types_globals_metadata::I16
15-
// gdb-check:type = i16
16-
// gdb-command:whatis basic_types_globals_metadata::I32
17-
// gdb-check:type = i32
18-
// gdb-command:whatis basic_types_globals_metadata::I64
19-
// gdb-check:type = i64
20-
// gdb-command:whatis basic_types_globals_metadata::U
21-
// gdb-check:type = usize
22-
// gdb-command:whatis basic_types_globals_metadata::U8
23-
// gdb-check:type = u8
24-
// gdb-command:whatis basic_types_globals_metadata::U16
25-
// gdb-check:type = u16
26-
// gdb-command:whatis basic_types_globals_metadata::U32
27-
// gdb-check:type = u32
28-
// gdb-command:whatis basic_types_globals_metadata::U64
29-
// gdb-check:type = u64
30-
// gdb-command:whatis basic_types_globals_metadata::F16
31-
// gdb-check:type = f16
32-
// gdb-command:whatis basic_types_globals_metadata::F32
33-
// gdb-check:type = f32
34-
// gdb-command:whatis basic_types_globals_metadata::F64
35-
// gdb-check:type = f64
36-
// gdb-command:continue
5+
//@ gdb-command:run
6+
//@ gdb-command:whatis basic_types_globals_metadata::B
7+
//@ gdb-check:type = bool
8+
//@ gdb-command:whatis basic_types_globals_metadata::I
9+
//@ gdb-check:type = isize
10+
//@ gdb-command:whatis basic_types_globals_metadata::C
11+
//@ gdb-check:type = char
12+
//@ gdb-command:whatis basic_types_globals_metadata::I8
13+
//@ gdb-check:type = i8
14+
//@ gdb-command:whatis basic_types_globals_metadata::I16
15+
//@ gdb-check:type = i16
16+
//@ gdb-command:whatis basic_types_globals_metadata::I32
17+
//@ gdb-check:type = i32
18+
//@ gdb-command:whatis basic_types_globals_metadata::I64
19+
//@ gdb-check:type = i64
20+
//@ gdb-command:whatis basic_types_globals_metadata::U
21+
//@ gdb-check:type = usize
22+
//@ gdb-command:whatis basic_types_globals_metadata::U8
23+
//@ gdb-check:type = u8
24+
//@ gdb-command:whatis basic_types_globals_metadata::U16
25+
//@ gdb-check:type = u16
26+
//@ gdb-command:whatis basic_types_globals_metadata::U32
27+
//@ gdb-check:type = u32
28+
//@ gdb-command:whatis basic_types_globals_metadata::U64
29+
//@ gdb-check:type = u64
30+
//@ gdb-command:whatis basic_types_globals_metadata::F16
31+
//@ gdb-check:type = f16
32+
//@ gdb-command:whatis basic_types_globals_metadata::F32
33+
//@ gdb-check:type = f32
34+
//@ gdb-command:whatis basic_types_globals_metadata::F64
35+
//@ gdb-check:type = f64
36+
//@ gdb-command:continue
3737

3838
#![allow(unused_variables)]
3939
#![allow(dead_code)]

0 commit comments

Comments
 (0)