Skip to content

Commit 035002a

Browse files
committed
---
yaml --- r: 275697 b: refs/heads/master c: cbe6292 h: refs/heads/master i: 275695: 4df2b9f
1 parent 0d307e9 commit 035002a

File tree

7 files changed

+39
-9
lines changed

7 files changed

+39
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9db6a41687bacde82585f127b43d418d5845e5c7
2+
refs/heads/master: cbe6292c58feb643917c0959f95173a3c312fbd4
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/configure

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,19 @@ then
819819
fi
820820
fi
821821

822+
# LLDB tests on OSX require /usr/bin/python, not something like Homebrew's
823+
# /usr/local/bin/python. We're loading a compiled module for LLDB tests which is
824+
# only compatible with the system.
825+
case $CFG_BUILD in
826+
*-apple-darwin)
827+
CFG_LLDB_PYTHON=/usr/bin/python
828+
;;
829+
*)
830+
CFG_LLDB_PYTHON=$CFG_PYTHON
831+
;;
832+
esac
833+
putvar CFG_LLDB_PYTHON
834+
822835
step_msg "looking for target specific programs"
823836

824837
probe CFG_ADB adb

trunk/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
616616
--stage-id stage$(1)-$(2) \
617617
--target $(2) \
618618
--host $(3) \
619-
--python $$(CFG_PYTHON) \
619+
--docck-python $$(CFG_PYTHON) \
620+
--lldb-python $$(CFG_LLDB_PYTHON) \
620621
--gdb-version="$(CFG_GDB_VERSION)" \
621622
--lldb-version="$(CFG_LLDB_VERSION)" \
622623
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \

trunk/src/bootstrap/build/check.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,19 @@ pub fn compiletest(build: &Build,
8181

8282
// FIXME: needs android support
8383
cmd.arg("--android-cross-path").arg("");
84+
8485
// FIXME: CFG_PYTHON should probably be detected more robustly elsewhere
85-
cmd.arg("--python").arg("python");
86+
let python_default = "python";
87+
cmd.arg("--docck-python").arg(python_default);
88+
89+
if build.config.build.ends_with("apple-darwin") {
90+
// Force /usr/bin/python on OSX for LLDB tests because we're loading the
91+
// LLDB plugin's compiled module which only works with the system python
92+
// (namely not Homebrew-installed python)
93+
cmd.arg("--lldb-python").arg("/usr/bin/python");
94+
} else {
95+
cmd.arg("--lldb-python").arg(python_default);
96+
}
8697

8798
if let Some(ref vers) = build.gdb_version {
8899
cmd.arg("--gdb-version").arg(vers);

trunk/src/tools/compiletest/src/common.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ pub struct Config {
8383
// The rustdoc executable
8484
pub rustdoc_path: PathBuf,
8585

86-
// The python executable
87-
pub python: String,
86+
// The python executable to use for LLDB
87+
pub lldb_python: String,
88+
89+
// The python executable to use for htmldocck
90+
pub docck_python: String,
8891

8992
// The llvm FileCheck binary path
9093
pub llvm_filecheck: Option<PathBuf>,

trunk/src/tools/compiletest/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7070
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
7171
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
7272
reqopt("", "rustdoc-path", "path to rustdoc to use for compiling", "PATH"),
73-
reqopt("", "python", "path to python to use for doc tests", "PATH"),
73+
reqopt("", "lldb-python", "path to python to use for doc tests", "PATH"),
74+
reqopt("", "docck-python", "path to python to use for doc tests", "PATH"),
7475
optopt("", "valgrind-path", "path to Valgrind executable for Valgrind tests", "PROGRAM"),
7576
optflag("", "force-valgrind", "fail if Valgrind tests cannot be run under Valgrind"),
7677
optopt("", "llvm-filecheck", "path to LLVM's FileCheck binary", "DIR"),
@@ -140,7 +141,8 @@ pub fn parse_config(args: Vec<String> ) -> Config {
140141
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
141142
rustc_path: opt_path(matches, "rustc-path"),
142143
rustdoc_path: opt_path(matches, "rustdoc-path"),
143-
python: matches.opt_str("python").unwrap(),
144+
lldb_python: matches.opt_str("lldb-python").unwrap(),
145+
docck_python: matches.opt_str("docck-python").unwrap(),
144146
valgrind_path: matches.opt_str("valgrind-path"),
145147
force_valgrind: matches.opt_present("force-valgrind"),
146148
llvm_filecheck: matches.opt_str("llvm-filecheck").map(|s| PathBuf::from(&s)),

trunk/src/tools/compiletest/src/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testpaths: &TestP
776776
let lldb_script_path = rust_src_root.join("src/etc/lldb_batchmode.py");
777777
cmd2procres(config,
778778
testpaths,
779-
Command::new(&config.python)
779+
Command::new(&config.lldb_python)
780780
.arg(&lldb_script_path)
781781
.arg(test_executable)
782782
.arg(debugger_script)
@@ -1901,7 +1901,7 @@ fn run_rustdoc_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
19011901

19021902
let res = cmd2procres(config,
19031903
testpaths,
1904-
Command::new(&config.python)
1904+
Command::new(&config.docck_python)
19051905
.arg(root.join("src/etc/htmldocck.py"))
19061906
.arg(out_dir)
19071907
.arg(&testpaths.file));

0 commit comments

Comments
 (0)