Rollup merge of #96237 - AlecGoncharow:issue-96011-fix, r=Mark-Simulacrum
compiletest: combine `--*-python` args Since these arguments are now always the same, combine them into a singular `--python` argument. Fixes #96011
This commit is contained in:
commit
e1935cc196
@ -1400,9 +1400,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
targetflags.extend(builder.lld_flags(target));
|
||||
cmd.arg("--target-rustcflags").arg(targetflags.join(" "));
|
||||
|
||||
cmd.arg("--docck-python").arg(builder.python());
|
||||
|
||||
cmd.arg("--lldb-python").arg(builder.python());
|
||||
cmd.arg("--python").arg(builder.python());
|
||||
|
||||
if let Some(ref gdb) = builder.config.gdb {
|
||||
cmd.arg("--gdb").arg(gdb);
|
||||
|
@ -198,11 +198,8 @@ pub struct Config {
|
||||
/// The rust-demangler executable.
|
||||
pub rust_demangler_path: Option<PathBuf>,
|
||||
|
||||
/// The Python executable to use for LLDB.
|
||||
pub lldb_python: String,
|
||||
|
||||
/// The Python executable to use for htmldocck.
|
||||
pub docck_python: String,
|
||||
/// The Python executable to use for LLDB and htmldocck.
|
||||
pub python: String,
|
||||
|
||||
/// The jsondocck executable.
|
||||
pub jsondocck_path: Option<String>,
|
||||
|
@ -43,8 +43,7 @@ fn config() -> Config {
|
||||
"--compile-lib-path=",
|
||||
"--run-lib-path=",
|
||||
"--rustc-path=",
|
||||
"--lldb-python=",
|
||||
"--docck-python=",
|
||||
"--python=",
|
||||
"--jsondocck-path=",
|
||||
"--src-base=",
|
||||
"--build-base=",
|
||||
|
@ -61,8 +61,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||
.reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH")
|
||||
.optopt("", "rustdoc-path", "path to rustdoc to use for compiling", "PATH")
|
||||
.optopt("", "rust-demangler-path", "path to rust-demangler to use in tests", "PATH")
|
||||
.reqopt("", "lldb-python", "path to python to use for doc tests", "PATH")
|
||||
.reqopt("", "docck-python", "path to python to use for doc tests", "PATH")
|
||||
.reqopt("", "python", "path to python to use for doc tests", "PATH")
|
||||
.optopt("", "jsondocck-path", "path to jsondocck to use for doc tests", "PATH")
|
||||
.optopt("", "valgrind-path", "path to Valgrind executable for Valgrind tests", "PROGRAM")
|
||||
.optflag("", "force-valgrind", "fail if Valgrind tests cannot be run under Valgrind")
|
||||
@ -222,8 +221,7 @@ fn make_absolute(path: PathBuf) -> PathBuf {
|
||||
rustc_path: opt_path(matches, "rustc-path"),
|
||||
rustdoc_path: matches.opt_str("rustdoc-path").map(PathBuf::from),
|
||||
rust_demangler_path: matches.opt_str("rust-demangler-path").map(PathBuf::from),
|
||||
lldb_python: matches.opt_str("lldb-python").unwrap(),
|
||||
docck_python: matches.opt_str("docck-python").unwrap(),
|
||||
python: matches.opt_str("python").unwrap(),
|
||||
jsondocck_path: matches.opt_str("jsondocck-path"),
|
||||
valgrind_path: matches.opt_str("valgrind-path"),
|
||||
force_valgrind: matches.opt_present("force-valgrind"),
|
||||
|
@ -179,7 +179,7 @@ pub fn compute_stamp_hash(config: &Config) -> String {
|
||||
}
|
||||
|
||||
Some(Debugger::Lldb) => {
|
||||
config.lldb_python.hash(&mut hash);
|
||||
config.python.hash(&mut hash);
|
||||
config.lldb_python_dir.hash(&mut hash);
|
||||
env::var_os("PATH").hash(&mut hash);
|
||||
env::var_os("PYTHONPATH").hash(&mut hash);
|
||||
@ -1141,7 +1141,7 @@ fn run_lldb(
|
||||
// Prepare the lldb_batchmode which executes the debugger script
|
||||
let lldb_script_path = rust_src_root.join("src/etc/lldb_batchmode.py");
|
||||
self.cmd2procres(
|
||||
Command::new(&self.config.lldb_python)
|
||||
Command::new(&self.config.python)
|
||||
.arg(&lldb_script_path)
|
||||
.arg(test_executable)
|
||||
.arg(debugger_script)
|
||||
@ -2256,7 +2256,7 @@ fn run_rustdoc_test(&self) {
|
||||
self.check_rustdoc_test_option(proc_res);
|
||||
} else {
|
||||
let root = self.config.find_rust_src_root().unwrap();
|
||||
let mut cmd = Command::new(&self.config.docck_python);
|
||||
let mut cmd = Command::new(&self.config.python);
|
||||
cmd.arg(root.join("src/etc/htmldocck.py")).arg(&out_dir).arg(&self.testpaths.file);
|
||||
if self.config.bless {
|
||||
cmd.arg("--bless");
|
||||
@ -2457,7 +2457,7 @@ fn run_rustdoc_json_test(&self) {
|
||||
let mut json_out = out_dir.join(self.testpaths.file.file_stem().unwrap());
|
||||
json_out.set_extension("json");
|
||||
let res = self.cmd2procres(
|
||||
Command::new(&self.config.docck_python)
|
||||
Command::new(&self.config.python)
|
||||
.arg(root.join("src/etc/check_missing_items.py"))
|
||||
.arg(&json_out),
|
||||
);
|
||||
@ -2852,7 +2852,7 @@ fn run_rmake_test(&self) {
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.env("TARGET", &self.config.target)
|
||||
.env("PYTHON", &self.config.docck_python)
|
||||
.env("PYTHON", &self.config.python)
|
||||
.env("S", src_root)
|
||||
.env("RUST_BUILD_STAGE", &self.config.stage_id)
|
||||
.env("RUSTC", cwd.join(&self.config.rustc_path))
|
||||
|
Loading…
Reference in New Issue
Block a user