Skip to content

Commit 45abd8c

Browse files
committed
Fix Issue 112009
modify fuction clond() -> cloned() optimize the code Handle the problem that the pathset is empty and modify the judgment of the builder::tests::test_exclude_kind Delete unnecessary judegment conditions skip test for library/std duo to OOM in benches as library/alloc Add FIXME for WASM32
1 parent 32aa405 commit 45abd8c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/bootstrap/builder.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,10 @@ impl StepDescription {
302302
}
303303
}
304304

305-
fn maybe_run(&self, builder: &Builder<'_>, pathsets: Vec<PathSet>) {
306-
if pathsets.iter().any(|set| self.is_excluded(builder, set)) {
305+
fn maybe_run(&self, builder: &Builder<'_>, mut pathsets: Vec<PathSet>) {
306+
pathsets.retain(|set| !self.is_excluded(builder, set));
307+
308+
if pathsets.is_empty() {
307309
return;
308310
}
309311

src/bootstrap/builder/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ fn test_exclude_kind() {
136136
let mut config = configure("test", &["A"], &["A"]);
137137
// Ensure our test is valid, and `test::Rustc` would be run without the exclude.
138138
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
139-
// Ensure tests for rustc are skipped.
139+
// Ensure tests for rustc are not skipped.
140140
config.skip = vec![path.clone()];
141-
assert!(!run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
141+
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
142142
// Ensure builds for rustc are not skipped.
143143
assert!(run_build(&[], config).contains::<compile::Rustc>());
144144
}

src/ci/docker/host-x86_64/wasm32/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ ENV NO_CHANGE_USER=1
5858
RUN chown 10719 -R /emsdk-portable/
5959

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

0 commit comments

Comments
 (0)