Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Step Skipping Caused by Using the --exclude Option #115088

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ impl StepDescription {
}
}

fn maybe_run(&self, builder: &Builder<'_>, pathsets: Vec<PathSet>) {
if pathsets.iter().any(|set| self.is_excluded(builder, set)) {
fn maybe_run(&self, builder: &Builder<'_>, mut pathsets: Vec<PathSet>) {
pathsets.retain(|set| !self.is_excluded(builder, set));

if pathsets.is_empty() {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ fn test_exclude_kind() {
let mut config = configure("test", &["A"], &["A"]);
// Ensure our test is valid, and `test::Rustc` would be run without the exclude.
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
// Ensure tests for rustc are skipped.
// Ensure tests for rustc are not skipped.
config.skip = vec![path.clone()];
assert!(!run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
// Ensure builds for rustc are not skipped.
assert!(run_build(&[], config).contains::<compile::Rustc>());
}
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ ENV NO_CHANGE_USER=1
RUN chown 10719 -R /emsdk-portable/

# Exclude library/alloc due to OOM in benches.
# FIXME: Fix std tests
ENV SCRIPT python3 ../x.py test --stage 2 --host='' --target $TARGETS \
--skip library/alloc
--skip library/alloc --skip library/std
Loading