diff options
| author | bors <bors@rust-lang.org> | 2024-07-24 04:48:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-24 04:48:02 +0000 |
| commit | f4831e6317fe54a4e2e3309ff75d396f3bca291d (patch) | |
| tree | 1551b1808986bb2e38e6bef128f944b8cb16cbe0 /src | |
| parent | 42103d69b73fb4e9d03d5cf66ec12985bb526f6e (diff) | |
| parent | 1fe9726c954ff24c47b6e3665094cef58637c8ad (diff) | |
| download | rust-f4831e6317fe54a4e2e3309ff75d396f3bca291d.tar.gz rust-f4831e6317fe54a4e2e3309ff75d396f3bca291d.zip | |
Auto merge of #128128 - matthiaskrgr:rollup-jz6w0ck, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #125962 (Update tracking issue for `const_binary_heap_new_in`) - #126770 (Add elem_offset and related methods) - #127481 (Remove generic lifetime parameter of trait `Pattern`) - #128043 (Docs for core::primitive: mention that "core" can be shadowed, too, so we should write "::core") - #128092 (Remove wrapper functions from c.rs) - #128100 (Allow to pass a full path for `run-make` tests) - #128106 (Fix return type of FileAttr methods on AIX target) - #128108 (ensure std step before preparing sysroot) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/compile.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/lib.rs | 27 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 3e79acad1c4..9bbebf9b870 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1700,6 +1700,7 @@ impl Step for Assemble { // If we're downloading a compiler from CI, we can use the same compiler for all stages other than 0. if builder.download_rustc() { + builder.ensure(Std::new(target_compiler, target_compiler.host)); let sysroot = builder.ensure(Sysroot { compiler: target_compiler, force_recompile: false }); // Ensure that `libLLVM.so` ends up in the newly created target directory, diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index 0cf05b32e96..81a5acb5cf2 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -25,7 +25,7 @@ use build_helper::git::{get_git_modified_files, get_git_untracked_files}; use core::panic; use getopts::Options; use std::collections::HashSet; -use std::ffi::OsString; +use std::ffi::{OsStr, OsString}; use std::fs; use std::io::{self, ErrorKind}; use std::path::{Path, PathBuf}; @@ -225,6 +225,29 @@ pub fn parse_config(args: Vec<String>) -> Config { // Avoid spawning an external command when we know tidy won't be used. false }; + let filters = if mode == Mode::RunMake { + matches + .free + .iter() + .map(|f| { + let path = Path::new(f); + let mut iter = path.iter().skip(1); + + // We skip the test folder and check if the user passed `rmake.rs` or `Makefile`. + if iter + .next() + .is_some_and(|s| s == OsStr::new("rmake.rs") || s == OsStr::new("Makefile")) + && iter.next().is_none() + { + path.parent().unwrap().to_str().unwrap().to_string() + } else { + f.to_string() + } + }) + .collect::<Vec<_>>() + } else { + matches.free.clone() + }; Config { bless: matches.opt_present("bless"), compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")), @@ -249,7 +272,7 @@ pub fn parse_config(args: Vec<String>) -> Config { debugger: None, run_ignored, with_debug_assertions, - filters: matches.free.clone(), + filters, skip: matches.opt_strs("skip"), filter_exact: matches.opt_present("exact"), force_pass_mode: matches.opt_str("pass").map(|mode| { |
