Skip to content

Commit 7058cf1

Browse files
committed
run tests with a fresh target directory
1 parent 6874f57 commit 7058cf1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ci/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,18 @@ if [ "$TARGET" = "s390x-unknown-linux-gnu" ]; then
109109
sleep 1
110110
done
111111
else
112+
# rm -rf target is executed before each build to ensure there are no leftover
113+
# caches from previous builds. This happened at least in the FreeBSD CI,
114+
# where the build script didn't re-execute across builds.
115+
116+
rm -rf target
112117
cargo test --no-default-features --manifest-path libc-test/Cargo.toml \
113118
--target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
114119

120+
rm -rf target
115121
cargo test --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
116122

123+
rm -rf target
117124
RUST_BACKTRACE=1 cargo test --features extra_traits --manifest-path libc-test/Cargo.toml \
118125
--target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
119126
fi

0 commit comments

Comments
 (0)