Skip to content

Commit c852486

Browse files
committed
---
yaml --- r: 124631 b: refs/heads/try c: 154ca08 h: refs/heads/master i: 124629: 715f486 124627: 333e96d 124623: 7fd624d v: v3
1 parent 3f214ba commit c852486

File tree

130 files changed

+924
-5933
lines changed

Some content is hidden

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

130 files changed

+924
-5933
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f15d6d28396e8700b6c3f2704204a2769e710403
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: dff46952ab5c4567d1b5b35bfbd8befc45cdd38e
5+
refs/heads/try: 154ca0838868ca08a8aae20f6af245e2b970a3de
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,20 @@ probe CFG_LLDB lldb
502502

503503
if [ ! -z "$CFG_LLDB" ]
504504
then
505-
# Try-branch hack
506-
CFG_LLDB_PYTHON_DIR="/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/Python"
507-
putvar CFG_LLDB_PYTHON_DIR
505+
# If CFG_LLDB_PYTHON_DIR is not already set from the outside and valid, try to read it from
506+
# LLDB via the -P commandline options.
507+
if [ -z "$CFG_LLDB_PYTHON_DIR" ] || [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
508+
then
509+
CFG_LLDB_PYTHON_DIR=$($CFG_LLDB -P)
510+
511+
# If CFG_LLDB_PYTHON_DIR is not a valid directory, set it to something more readable
512+
if [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
513+
then
514+
CFG_LLDB_PYTHON_DIR="LLDB_PYTHON_DIRECTORY_NOT_FOUND"
515+
fi
516+
517+
putvar CFG_LLDB_PYTHON_DIR
518+
fi
508519
fi
509520

510521
step_msg "looking for target specific programs"

branches/try/mk/tests.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ check: cleantmptestlogs cleantestlibs check-notidy tidy
176176
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
177177
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
178178

179-
check-lite: cleantestlibs cleantmptestlogs check-stage1-debuginfo-lldb \
179+
check-lite: cleantestlibs cleantmptestlogs \
180+
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
181+
check-stage2-rpass \
182+
check-stage2-rfail check-stage2-cfail check-stage2-rmake
180183
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
181184

182185
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
@@ -550,10 +553,8 @@ ifeq ($(CFG_LLDB),)
550553
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
551554
endif
552555

553-
# Enable LLDB tests only on apple-darwin
554-
ifneq ($(CFG_OSTYPE),apple-darwin)
555-
CTEST_DISABLE_debuginfo-lldb = "LLDB tests only enabled on apple-darwin"
556-
endif
556+
# Completely disable LLDB tests for now
557+
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
557558

558559
ifeq ($(CFG_CLANG),)
559560
CTEST_DISABLE_codegen = "no clang found"

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::io::fs;
3030
use std::from_str::FromStr;
3131
use getopts::{optopt, optflag, reqopt};
3232
use common::Config;
33-
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
33+
use common::{Pretty, DebugInfoGdb, Codegen};
3434
use util::logv;
3535
use regex::Regex;
3636

@@ -241,16 +241,6 @@ pub fn run_tests(config: &Config) {
241241
os::setenv("RUST_TEST_TASKS","1");
242242
}
243243

244-
match config.mode {
245-
DebugInfoLldb => {
246-
// Some older versions of LLDB seem to have problems with multiple
247-
// instances running in parallel, so only run one test task at a
248-
// time.
249-
os::setenv("RUST_TEST_TASKS", "1");
250-
}
251-
_ => { /* proceed */ }
252-
}
253-
254244
let opts = test_opts(config);
255245
let tests = make_tests(config);
256246
// sadly osx needs some file descriptor limits raised for running tests in

branches/try/src/compiletest/runtest.rs

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -532,31 +532,10 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
532532
breakpoint_lines
533533
} = parse_debugger_commands(testfile, "lldb");
534534

535-
let rust_src_root = match find_rust_src_root(config) {
536-
Some(path) => path,
537-
None => fatal("Could not find Rust source root directory")
538-
};
539-
540535
// Write debugger script:
541536
// We don't want to hang when calling `quit` while the process is still running
542537
let mut script_str = String::from_str("settings set auto-confirm true\n");
543538

544-
// Make LLDB emit its version, so we have it documented in the test output
545-
script_str.push_str("version\n");
546-
547-
// Switch LLDB into "Rust mode"
548-
let rust_formatters_postfix = Path::new("./src/etc/lldb_rust_formatters.py");
549-
let lldb_rust_formatters = rust_src_root.join(rust_formatters_postfix);
550-
551-
script_str.push_str("command script import ");
552-
script_str.push_str(lldb_rust_formatters.as_str()
553-
.expect("Could not convert lldb_rust_formatters path to UTF-8"));
554-
script_str.push_str("\n");
555-
script_str.push_str("type summary add --no-value ");
556-
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
557-
script_str.push_str("-x \".*\" --category Rust\n");
558-
script_str.push_str("type category enable Rust\n");
559-
560539
// Set breakpoints on every line that contains the string "#break"
561540
for line in breakpoint_lines.iter() {
562541
script_str.push_str(format!("breakpoint set --line {}\n",
@@ -581,28 +560,18 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
581560
let debugger_script = make_out_name(config, testfile, "debugger.script");
582561

583562
// Let LLDB execute the script via lldb_batchmode.py
584-
let lldb_batchmode_path = rust_src_root
585-
.join(Path::new("./src/etc/lldb_batchmode.py"));
586-
587-
let debugger_run_result = run_lldb(config,
588-
&lldb_batchmode_path,
589-
&exe_file,
590-
&debugger_script);
563+
let debugger_run_result = run_lldb(config, &exe_file, &debugger_script);
591564

592565
if !debugger_run_result.status.success() {
593566
fatal_proc_rec("Error while running LLDB", &debugger_run_result);
594567
}
595568

596569
check_debugger_output(&debugger_run_result, check_lines.as_slice());
597570

598-
fn run_lldb(config: &Config,
599-
lldb_batchmode: &Path,
600-
test_executable: &Path,
601-
debugger_script: &Path)
602-
-> ProcRes {
571+
fn run_lldb(config: &Config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
603572
// Prepare the lldb_batchmode which executes the debugger script
604573
let mut cmd = Command::new("python");
605-
cmd.arg(lldb_batchmode)
574+
cmd.arg("./src/etc/lldb_batchmode.py")
606575
.arg(test_executable)
607576
.arg(debugger_script)
608577
.env_set_all([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
@@ -630,19 +599,6 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
630599
cmdline: format!("{}", cmd)
631600
};
632601
}
633-
634-
fn find_rust_src_root(config: &Config) -> Option<Path> {
635-
let mut path = config.src_base.clone();
636-
let path_postfix = Path::new("src/etc/lldb_batchmode.py");
637-
638-
while path.pop() {
639-
if path.join(path_postfix.clone()).is_file() {
640-
return Some(path);
641-
}
642-
}
643-
644-
return None;
645-
}
646602
}
647603

648604
struct DebuggerCommands {

branches/try/src/etc/lldb_batchmode.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
import re
3232
import atexit
3333

34+
# Terminate the debugger
35+
atexit.register(lambda: lldb.SBDebugger.Terminate())
36+
3437
# Set this to True for additional output
3538
DEBUG_OUTPUT = False
3639

0 commit comments

Comments
 (0)