Skip to content

Commit 43bec40

Browse files
committed
Auto merge of rust-lang#73383 - ecstatic-morse:test-unoptimized-std, r=Mark-Simulacrum
Run standard library unit tests without optimizations in `nopt` CI jobs This was discussed in rust-lang#73288 as a way to catch similar issues in the future. This builds an unoptimized standard library with the bootstrap compiler and runs the unit tests. This takes about 2 minutes on my laptop. I confirmed that this method works locally, although there may be a better way of implementing it. It would be better to use the stage 2 compiler instead of the bootstrap one. Notably, there are currently four `libstd` unit tests that fail in debug mode on `i686-unkown-linux-gnu` (a tier one target): ``` failures: f32::tests::test_float_bits_conv f32::tests::test_total_cmp f64::tests::test_float_bits_conv f64::tests::test_total_cmp ``` These are the tests that prompted rust-lang#73288 as well as the ones added in rust-lang#72568, which is currently broken due to rust-lang#73328.
2 parents 8e5a277 + 662871f commit 43bec40

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1919
COPY scripts/sccache.sh /scripts/
2020
RUN sh /scripts/sccache.sh
2121

22+
RUN mkdir -p /config
23+
RUN echo "[rust]" > /config/nopt-std-config.toml
24+
RUN echo "optimize = false" >> /config/nopt-std-config.toml
25+
2226
ENV RUST_CONFIGURE_ARGS --build=i686-unknown-linux-gnu --disable-optimize-tests
23-
ENV SCRIPT python3 ../x.py --stage 2 test
27+
ENV SCRIPT python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std \
28+
&& python3 ../x.py --stage 2 test
2429

2530
# FIXME(#59637) takes too long on CI right now
2631
ENV NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1

src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1818
COPY scripts/sccache.sh /scripts/
1919
RUN sh /scripts/sccache.sh
2020

21+
RUN mkdir -p /config
22+
RUN echo "[rust]" > /config/nopt-std-config.toml
23+
RUN echo "optimize = false" >> /config/nopt-std-config.toml
24+
2125
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \
2226
--disable-optimize-tests \
2327
--set rust.test-compare-mode
24-
ENV SCRIPT python3 ../x.py --stage 2 test
28+
ENV SCRIPT python3 ../x.py test --stage 0 --config /config/nopt-std-config.toml library/std \
29+
&& python3 ../x.py --stage 2 test

0 commit comments

Comments
 (0)