Skip to content

Commit aa6a8ee

Browse files
committed
Auto merge of #124296 - cuviper:dist-cargo-tests, r=onur-ozkan
bootstrap: keep all cargo test files in dist rustc-src Cargo tests use some files that we would otherwise exclude, especially the `cargo init` tests that are meant to deal with pre-existing `.git` and `.hg` repos and their ignore files. Keeping these in our dist tarball doesn't take much space, and allows distro builds to run these tests successfully.
2 parents 4d570ee + 899e3ae commit aa6a8ee

File tree

1 file changed

+6
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-0
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+6
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,12 @@ fn copy_src_dirs(
830830
return false;
831831
}
832832

833+
// Cargo tests use some files like `.gitignore` that we would otherwise exclude.
834+
const CARGO_TESTS: &[&str] = &["tools/cargo/tests", "tools\\cargo\\tests"];
835+
if CARGO_TESTS.iter().any(|path| spath.contains(path)) {
836+
return true;
837+
}
838+
833839
let full_path = Path::new(dir).join(path);
834840
if exclude_dirs.iter().any(|excl| full_path == Path::new(excl)) {
835841
return false;

0 commit comments

Comments
 (0)