Change:
Compiletest currently has two different arguments telling it which python to use. Since , both are always the same. We should change it to just one argument to simplify things. Mentoring instructions: Change to be a single argument, then change to use the updated arguments. are you interested in tackling this one too? :) label +A-rustbuild +A-testsuite +E-easy +E-mentor Originally posted by in <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
claim

Discussion:
targetflags.extend(builder.lld_flags(target)); cmd.arg("--target-rustcflags").arg(targetflags.join(" ")); <del> cmd.arg("--docck-python").arg(builder.python()); cmd.arg("--lldb-python").arg(builder.python()); </del> <ins> cmd.arg("--python").arg(builder.python()); </ins> if let Some(ref gdb) = builder.config.gdb { cmd.arg("--gdb").arg(gdb);

/// The rust-demangler executable. pub rust_demangler_path: Option<PathBuf>, <del> /// The Python executable to use for LLDB. pub lldb_python: String, /// The Python executable to use for htmldocck. pub docck_python: String, </del> <ins> /// The Python executable to use for LLDB and htmldocck. pub python: String, </ins> /// The jsondocck executable. pub jsondocck_path: Option<String>,

"--compile-lib-path=", "--run-lib-path=", "--rustc-path=", <del> "--lldb-python=", "--docck-python=", </del> <ins> "--python=", </ins> "--jsondocck-path=", "--src-base=", "--build-base=",

.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") <del> .reqopt("", "lldb-python", "path to python to use for doc tests", "PATH") .reqopt("", "docck-python", "path to python to use for doc tests", "PATH") </del> <ins> .reqopt("", "python", "path to python to use for doc tests", "PATH") </ins> .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")

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), <del> lldb_python: matches.opt_str("lldb-python").unwrap(), docck_python: matches.opt_str("docck-python").unwrap(), </del> <ins> python: matches.opt_str("python").unwrap(), </ins> jsondocck_path: matches.opt_str("jsondocck-path"), valgrind_path: matches.opt_str("valgrind-path"), force_valgrind: matches.opt_present("force-valgrind"),

} Some(Debugger::Lldb) => { <del> config.lldb_python.hash(&mut hash); </del> <ins> config.python.hash(&mut hash); </ins> config.lldb_python_dir.hash(&mut hash); env::var_os("PATH").hash(&mut hash); env::var_os("PYTHONPATH").hash(&mut hash);

// Prepare the lldb_batchmode which executes the debugger script let lldb_script_path = rust_src_root.join("src/etc/lldb_batchmode.py"); self.cmd2procres( <del> Command::new(&self.config.lldb_python) </del> <ins> Command::new(&self.config.python) </ins> .arg(&lldb_script_path) .arg(test_executable) .arg(debugger_script)

self.check_rustdoc_test_option(proc_res); } else { let root = self.config.find_rust_src_root().unwrap(); <del> let mut cmd = Command::new(&self.config.docck_python); </del> <ins> let mut cmd = Command::new(&self.config.python); </ins> cmd.arg(root.join("src/etc/htmldocck.py")).arg(&out_dir).arg(&self.testpaths.file); if self.config.bless { cmd.arg("--bless");

let mut json_out = out_dir.join(self.testpaths.file.file_stem().unwrap()); json_out.set_extension("json"); let res = self.cmd2procres( <del> Command::new(&self.config.docck_python) </del> <ins> Command::new(&self.config.python) </ins> .arg(root.join("src/etc/check_missing_items.py")) .arg(&json_out), );

.stdout(Stdio::piped()) .stderr(Stdio::piped()) .env("TARGET", &self.config.target) <del> .env("PYTHON", &self.config.docck_python) </del> <ins> .env("PYTHON", &self.config.python) </ins> .env("S", src_root) .env("RUST_BUILD_STAGE", &self.config.stage_id) .env("RUSTC", cwd.join(&self.config.rustc_path))