Skip to content

Restore working debuginfo tests by trimming comments from non-header directive lines #47155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/test/debuginfo/basic-types-globals-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/basic-types-globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/basic-types-metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/basic-types-mut-globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/by-value-non-immediate-argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/drop-locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/function-arg-initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/function-prologue-stepping-regular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scopes-in-block-expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/limited-debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/macro-stepping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/method-on-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/option-like-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/pretty-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/shadowed-variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ===================================================================================
Expand Down
38 changes: 38 additions & 0 deletions src/test/debuginfo/should-fail.rs
Original file line number Diff line number Diff line change
@@ -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() {()}

1 change: 1 addition & 0 deletions src/test/debuginfo/simple-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/simple-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/struct-in-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/type-names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/union-smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/vec-slices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down