diff options
| author | bors <bors@rust-lang.org> | 2024-04-26 22:22:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-26 22:22:47 +0000 |
| commit | aa6a8ee2701369bf30f4495818667d5489a72ac4 (patch) | |
| tree | e9534f94058b40d480a46094286093322b51fc46 | |
| parent | 4d570eea025a19564429eb52b34ec34e14659f55 (diff) | |
| parent | 899e3ae86b082dd5d314fe90ba26510db64e1d51 (diff) | |
| download | rust-aa6a8ee2701369bf30f4495818667d5489a72ac4.tar.gz rust-aa6a8ee2701369bf30f4495818667d5489a72ac4.zip | |
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.
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 0eca20901b7..770a5cdb232 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -830,6 +830,12 @@ fn copy_src_dirs( return false; } + // Cargo tests use some files like `.gitignore` that we would otherwise exclude. + const CARGO_TESTS: &[&str] = &["tools/cargo/tests", "tools\\cargo\\tests"]; + if CARGO_TESTS.iter().any(|path| spath.contains(path)) { + return true; + } + let full_path = Path::new(dir).join(path); if exclude_dirs.iter().any(|excl| full_path == Path::new(excl)) { return false; |
