auto merge of #18092 : michaelwoerister/rust/lldb-test-versioning, r=alexcrichton

Now that there are build bots with a stable enough LLDB version on OSX we can finally let the tests run on every PR!
😹
This commit is contained in:
bors 2014-10-22 21:32:16 +00:00
commit 7d7e409839
86 changed files with 135 additions and 36 deletions

View File

@ -584,13 +584,14 @@ ifeq ($(CFG_LLDB),)
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
endif
# Completely disable LLDB tests for now
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
ifeq ($(CFG_CLANG),)
CTEST_DISABLE_codegen = "no clang found"
endif
ifneq ($(CFG_OSTYPE),apple-darwin)
CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
endif
ifeq ($(CFG_OSTYPE),apple-darwin)
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
endif

View File

@ -25,7 +25,7 @@ use std::io::fs;
use std::from_str::FromStr;
use getopts::{optopt, optflag, reqopt};
use common::Config;
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
use common::{Pretty, DebugInfoGdb, Codegen};
use util::logv;
use regex::Regex;
@ -235,16 +235,6 @@ pub fn run_tests(config: &Config) {
os::setenv("RUST_TEST_TASKS","1");
}
match config.mode {
DebugInfoLldb => {
// Some older versions of LLDB seem to have problems with multiple
// instances running in parallel, so only run one test task at a
// time.
os::setenv("RUST_TEST_TASKS", "1");
}
_ => { /* proceed */ }
}
let opts = test_opts(config);
let tests = make_tests(config);
// sadly osx needs some file descriptor limits raised for running tests in

View File

@ -653,7 +653,15 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
script_str.push_str("version\n");
// Switch LLDB into "Rust mode"
script_str.push_str("command script import ./src/etc/lldb_rust_formatters.py\n");
let rust_src_root = find_rust_src_root(config)
.expect("Could not find Rust source root");
let rust_pp_module_rel_path = Path::new("./src/etc/lldb_rust_formatters.py");
let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
.as_str()
.unwrap()
.to_string();
script_str.push_str(format!("command script import {}\n", rust_pp_module_abs_path[])[]);
script_str.push_str("type summary add --no-value ");
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
script_str.push_str("-x \".*\" --category Rust\n");
@ -683,7 +691,10 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
let debugger_script = make_out_name(config, testfile, "debugger.script");
// Let LLDB execute the script via lldb_batchmode.py
let debugger_run_result = run_lldb(config, &exe_file, &debugger_script);
let debugger_run_result = run_lldb(config,
&exe_file,
&debugger_script,
&rust_src_root);
if !debugger_run_result.status.success() {
fatal_proc_rec("Error while running LLDB", &debugger_run_result);
@ -691,10 +702,16 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
check_debugger_output(&debugger_run_result, check_lines.as_slice());
fn run_lldb(config: &Config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
fn run_lldb(config: &Config,
test_executable: &Path,
debugger_script: &Path,
rust_src_root: &Path)
-> ProcRes {
// Prepare the lldb_batchmode which executes the debugger script
let lldb_script_path = rust_src_root.join(Path::new("./src/etc/lldb_batchmode.py"));
let mut cmd = Command::new("python");
cmd.arg("./src/etc/lldb_batchmode.py")
cmd.arg(lldb_script_path)
.arg(test_executable)
.arg(debugger_script)
.env_set_all([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);

View File

@ -141,6 +141,11 @@ if len(sys.argv) != 3:
target_path = sys.argv[1]
script_path = sys.argv[2]
print("LLDB batch-mode script")
print("----------------------")
print("Debugger commands script is '%s'." % script_path)
print("Target executable is '%s'." % target_path)
print("Current working directory is '%s'" % os.getcwd())
# Create a new debugger instance
debugger = lldb.SBDebugger.Create()
@ -151,10 +156,12 @@ debugger.SetAsync(False)
# Create a target from a file and arch
print("Creating a target for '%s'" % target_path)
target = debugger.CreateTargetWithFileAndArch(target_path, lldb.LLDB_ARCH_DEFAULT)
target_error = lldb.SBError()
target = debugger.CreateTarget(target_path, None, None, True, target_error)
if not target:
print("Could not create debugging target '" + target_path + "'. Aborting.", file=sys.stderr)
print("Could not create debugging target '" + target_path + "': " + str(target_error) +
". Aborting.", file=sys.stderr)
sys.exit(1)

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz

View File

@ -16,6 +16,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz

View File

@ -16,6 +16,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz

View File

@ -15,6 +15,7 @@
// its numerical value.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -14,6 +14,7 @@
// its numerical value.
// compile-flags:-g
// min-lldb-version: 310
// === GDB TESTS ===================================================================================

View File

@ -11,6 +11,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// min-lldb-version: 310
// === GDB TESTS ===================================================================================

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// min-lldb-version: 310
// === GDB TESTS ===================================================================================

View File

@ -9,7 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
// its numerical value.

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,7 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// aux-build:cross_crate_debuginfo_type_uniquing.rs
extern crate cross_crate_debuginfo_type_uniquing;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// This test case checks if function arguments already have the correct value when breaking at the
// first line of the function, that is if the function prologue has already been executed at the
@ -18,17 +19,17 @@
// compile-flags:-g
// gdb-command:set print pretty off
// gdb-command:break function-arg-initialization.rs:243
// gdb-command:break function-arg-initialization.rs:258
// gdb-command:break function-arg-initialization.rs:262
// gdb-command:break function-arg-initialization.rs:266
// gdb-command:break function-arg-initialization.rs:270
// gdb-command:break function-arg-initialization.rs:274
// gdb-command:break function-arg-initialization.rs:278
// gdb-command:break function-arg-initialization.rs:282
// gdb-command:break function-arg-initialization.rs:286
// gdb-command:break function-arg-initialization.rs:294
// gdb-command:break function-arg-initialization.rs:301
// gdb-command:break function-arg-initialization.rs:244
// gdb-command:break function-arg-initialization.rs:259
// gdb-command:break function-arg-initialization.rs:263
// gdb-command:break function-arg-initialization.rs:267
// gdb-command:break function-arg-initialization.rs:271
// gdb-command:break function-arg-initialization.rs:275
// gdb-command:break function-arg-initialization.rs:279
// gdb-command:break function-arg-initialization.rs:283
// gdb-command:break function-arg-initialization.rs:287
// gdb-command:break function-arg-initialization.rs:295
// gdb-command:break function-arg-initialization.rs:302
// === GDB TESTS ===================================================================================

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// This test case checks if function arguments already have the correct value when breaking at the
// beginning of a function. Functions with the #[no_stack_check] attribute have the same prologue as

View File

@ -11,6 +11,7 @@
// This test case checks if function arguments already have the correct value when breaking at the
// beginning of a function.
// min-lldb-version: 310
// ignore-gdb
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -11,6 +11,7 @@
// ignore-android: FIXME(#10381)
// compile-flags:-g
// min-lldb-version: 310
// === GDB TESTS ===================================================================================

View File

@ -9,8 +9,10 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz
// gdb-command:run

View File

@ -10,8 +10,10 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:set print union on
// gdb-command:rbreak zzz
// gdb-command:run

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:rbreak zzz

View File

@ -18,6 +18,7 @@ fn main() {
}
// ignore-android: FIXME(#10381)
// ignore-lldb
// This test case checks whether compile unit names are set correctly, so that the correct default
// source file can be found.

View File

@ -10,18 +10,19 @@
// ignore-android: FIXME(#10381)
// ignore-windows failing on 64-bit bots FIXME #17638
// ignore-lldb
// compile-flags:-g
// gdb-command:break issue12886.rs:30
// gdb-command:break issue12886.rs:31
// gdb-command:run
// gdb-command:next
// gdb-check:[...]31[...]s
// gdb-check:[...]32[...]s
// gdb-command:continue
// IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS
// This test makes sure that gdb does not set unwanted breakpoints in inlined functions. If a
// breakpoint existed in unwrap(), then calling `next` would (when stopped at line 27) would stop
// breakpoint existed in unwrap(), then calling `next` would (when stopped at line 31) stop
// in unwrap() instead of stepping over the function invocation. By making sure that `s` is
// contained in the output, after calling `next` just once, we can be sure that we did not stop in
// unwrap(). (The testing framework doesn't allow for checking that some text is *not* contained in

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// ignore-lldb
// aux-build:issue13213aux.rs
extern crate issue13213aux;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// ignore-lldb
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags:--debuginfo=1
// ignore-lldb
pub trait TraitWithDefaultMethod {
fn method(self) {

View File

@ -10,6 +10,7 @@
// ignore-android: FIXME(#10381)
// ignore-test: Not sure what is going on here --pcwalton
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,9 +9,12 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:--debuginfo=1
// gdb-command:run
// lldb-command:run
// Nothing to do here really, just make sure it compiles. See issue #8513.
fn main() {

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g
// gdb-command:set print pretty off

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-tidy-linelength
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g

View File

@ -10,6 +10,7 @@
// ignore-windows: FIXME #13256
// ignore-android: FIXME(#10381)
// min-lldb-version: 310
// compile-flags:-g