Auto merge of #47155 - nerd2:debuginfo_test_fix, r=alexcrichton
Restore working debuginfo tests by trimming comments from non-header directive lines I noticed when adding a debuginfo test that nothing I did caused the test to fail. Tracing back this seems to have been caused by 3e6c83de1dc0a72df3663617d394a9e79641618d which broke parsing of the command/check lines, leaving all tests passing without any checking. This commit provides a basic (although still not very robust) restoration of tests and a should-fail test which checks the parser is running
This commit is contained in:
commit
fdc6ca44c3
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
// gdb-command:run
|
||||
|
@ -15,6 +15,7 @@
|
||||
// its numerical value.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
// gdb-command:run
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
// gdb-command:run
|
||||
|
@ -15,6 +15,7 @@
|
||||
// its numerical value.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// min-lldb-version: 310
|
||||
|
||||
// compile-flags:-g
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-aarch64
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// min-lldb-version: 310
|
||||
|
||||
// compile-flags:-g
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// ignore-windows
|
||||
// ignore-android
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// min-lldb-version: 310
|
||||
|
||||
#![allow(unused)]
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// min-lldb-version: 310
|
||||
|
||||
// This test case checks if function arguments already have the correct value
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// compile-flags:-g
|
||||
|
||||
// lldb-command:breakpoint set --name immediate_args
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
|
||||
// ignore-lldb
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-C debuginfo=1
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
// ignore-android
|
||||
// ignore-aarch64
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// aux-build:macro-stepping.rs
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// min-lldb-version: 310
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// min-lldb-version: 310
|
||||
|
||||
// compile-flags:-g
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// ignore-windows failing on win32 bot
|
||||
// ignore-freebsd: gdb package too new
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// ignore-android: FIXME(#10381)
|
||||
// compile-flags:-g
|
||||
// min-gdb-version 7.7
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// compile-flags:-g
|
||||
|
||||
// === GDB TESTS ===================================================================================
|
||||
|
38
src/test/debuginfo/should-fail.rs
Normal file
38
src/test/debuginfo/should-fail.rs
Normal file
@ -0,0 +1,38 @@
|
||||
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
|
||||
// == Test [gdb|lldb]-[command|check] are parsed correctly ===
|
||||
// should-fail
|
||||
// compile-flags:-g
|
||||
|
||||
// === GDB TESTS ===================================================================================
|
||||
|
||||
// gdb-command: run
|
||||
|
||||
// gdb-command: print x
|
||||
// gdb-check:$1 = 5
|
||||
|
||||
// === LLDB TESTS ==================================================================================
|
||||
|
||||
// lldb-command:run
|
||||
|
||||
// lldb-command:print x
|
||||
// lldb-check:[...]$0 = 5
|
||||
|
||||
fn main() {
|
||||
let x = 1;
|
||||
|
||||
zzz(); // #break
|
||||
}
|
||||
|
||||
fn zzz() {()}
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
// ignore-tidy-linelength
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb-version: 7.11.90 - 7.12.9
|
||||
// ignore-test // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-lldb
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// ignore-android: FIXME(#24958)
|
||||
// ignore-arm: FIXME(#24958)
|
||||
// ignore-aarch64: FIXME(#24958)
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// ignore-gdb-version: 7.11.90 - 7.12.9
|
||||
|
||||
// compile-flags:-g
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// ignore-windows
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
// min-lldb-version: 310
|
||||
|
||||
// compile-flags:-g
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// min-lldb-version: 310
|
||||
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
||||
|
||||
// compile-flags:-g
|
||||
|
||||
|
@ -901,6 +901,13 @@ impl<'test> TestCx<'test> {
|
||||
for line in reader.lines() {
|
||||
match line {
|
||||
Ok(line) => {
|
||||
let line =
|
||||
if line.starts_with("//") {
|
||||
line[2..].trim_left()
|
||||
} else {
|
||||
line.as_str()
|
||||
};
|
||||
|
||||
if line.contains("#break") {
|
||||
breakpoint_lines.push(counter);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user