diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 3ee66591c43a..2ccbd83be38e 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -260,13 +260,10 @@ pub struct Config { /// For example: /// - `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-gnu/lib` /// - /// FIXME: maybe rename this to reflect (1) which target platform (target, not host), and (2) - /// what "run libraries" are against. - /// /// FIXME: this is very under-documented in conjunction with the `remote-test-client` scheme and /// `RUNNER` scheme to actually run the target executable under the target platform environment, /// cf. [`Self::remote_test_client`] and [`Self::runner`]. - pub run_lib_path: Utf8PathBuf, + pub target_run_lib_path: Utf8PathBuf, /// Path to the *staged* `rustc`-under-test. Unless forced, this `rustc` is *staged*, and must /// not be confused with [`Self::stage0_rustc_path`]. diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index aef15cc69b3c..7ff729b1667a 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -376,7 +376,7 @@ fn opt_path(m: &getopts::Matches, nm: &str) -> Utf8PathBuf { || env::var_os("RUSTC_TEST_FAIL_FAST").is_some(), host_compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")), - run_lib_path: make_absolute(opt_path(matches, "run-lib-path")), + target_run_lib_path: make_absolute(opt_path(matches, "run-lib-path")), rustc_path: opt_path(matches, "rustc-path"), cargo_path: matches.opt_str("cargo-path").map(Utf8PathBuf::from), stage0_rustc_path: matches.opt_str("stage0-rustc-path").map(Utf8PathBuf::from), @@ -688,7 +688,7 @@ fn common_inputs_stamp(config: &Config) -> Stamp { stamp.add_dir(&src_root.join("src/etc/natvis")); - stamp.add_dir(&config.run_lib_path); + stamp.add_dir(&config.target_run_lib_path); if let Some(ref rustdoc_path) = config.rustdoc_path { stamp.add_path(&rustdoc_path); diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index c2fc0e55c220..54d6e0190ddc 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1060,7 +1060,7 @@ fn document_inner( rustdoc.current_dir(current_dir); rustdoc .arg("-L") - .arg(self.config.run_lib_path.as_path()) + .arg(self.config.target_run_lib_path.as_path()) .arg("-L") .arg(aux_dir) .arg("-o") @@ -1151,7 +1151,7 @@ fn exec_compiled_test_general( self.compose_and_run( test_client, - self.config.run_lib_path.as_path(), + self.config.target_run_lib_path.as_path(), Some(aux_dir.as_path()), None, ) @@ -1166,7 +1166,7 @@ fn exec_compiled_test_general( self.compose_and_run( wr_run, - self.config.run_lib_path.as_path(), + self.config.target_run_lib_path.as_path(), Some(aux_dir.as_path()), None, ) @@ -1181,7 +1181,7 @@ fn exec_compiled_test_general( self.compose_and_run( program, - self.config.run_lib_path.as_path(), + self.config.target_run_lib_path.as_path(), Some(aux_dir.as_path()), None, ) diff --git a/src/tools/compiletest/src/runtest/debuginfo.rs b/src/tools/compiletest/src/runtest/debuginfo.rs index 15e37cda7d96..5ef4366b68be 100644 --- a/src/tools/compiletest/src/runtest/debuginfo.rs +++ b/src/tools/compiletest/src/runtest/debuginfo.rs @@ -90,7 +90,7 @@ fn run_debuginfo_cdb_test(&self) { let debugger_run_result = self.compose_and_run( cdb, - self.config.run_lib_path.as_path(), + self.config.target_run_lib_path.as_path(), None, // aux_path None, // input ); @@ -313,7 +313,7 @@ fn run_debuginfo_gdb_test(&self) { gdb.args(debugger_opts).env("PYTHONPATH", pythonpath); debugger_run_result = - self.compose_and_run(gdb, self.config.run_lib_path.as_path(), None, None); + self.compose_and_run(gdb, self.config.target_run_lib_path.as_path(), None, None); } if !debugger_run_result.status.success() { diff --git a/src/tools/compiletest/src/runtest/run_make.rs b/src/tools/compiletest/src/runtest/run_make.rs index b29752f330d6..68574eb4bfd6 100644 --- a/src/tools/compiletest/src/runtest/run_make.rs +++ b/src/tools/compiletest/src/runtest/run_make.rs @@ -175,7 +175,7 @@ pub(super) fn run_rmake_test(&self) { .env("HOST_RUSTC_DYLIB_PATH", &self.config.host_compile_lib_path) // Provide the directory to libraries that might be needed to run binaries created // by a compiler invoked by the recipe. - .env("TARGET_EXE_DYLIB_PATH", &self.config.run_lib_path) + .env("TARGET_EXE_DYLIB_PATH", &self.config.target_run_lib_path) // Provide the target. .env("TARGET", &self.config.target) // Some tests unfortunately still need Python, so provide path to a Python interpreter. diff --git a/src/tools/compiletest/src/rustdoc_gui_test.rs b/src/tools/compiletest/src/rustdoc_gui_test.rs index 19bc3e0e4e7b..704f1806f8b7 100644 --- a/src/tools/compiletest/src/rustdoc_gui_test.rs +++ b/src/tools/compiletest/src/rustdoc_gui_test.rs @@ -59,7 +59,7 @@ fn incomplete_config_for_rustdoc_gui_test() -> Config { bless: Default::default(), fail_fast: Default::default(), host_compile_lib_path: Utf8PathBuf::default(), - run_lib_path: Utf8PathBuf::default(), + target_run_lib_path: Utf8PathBuf::default(), rustc_path: Utf8PathBuf::default(), cargo_path: Default::default(), stage0_rustc_path: Default::default(),