Skip to content

Commit 285bb2a

Browse files
committed
check-exercises: Silence non-warning output in DENYWARNINGS mode
In DENYWARNINGS I just want to see all the warnings; I don't care about whether the tests actually pass or what I'm compiling or downloading.
1 parent 4f42681 commit 285bb2a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

_test/check-exercises.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,17 @@ for exercise in exercises/*/tests; do
3535

3636
if [ -n "$DENYWARNINGS" ]; then
3737
sed -i -e '1i #![deny(warnings)]' src/lib.rs
38-
fi
3938

40-
# Run the test and get the status
41-
cargo test
39+
# No-run mode so we see no test output.
40+
# Quiet mode so we see no compile output
41+
# (such as "Compiling"/"Downloading").
42+
# Compiler errors will still be shown though.
43+
# Both flags are necessary to keep things quiet.
44+
cargo test --quiet --no-run
45+
else
46+
# Run the test and get the status
47+
cargo test
48+
fi
4249
)
4350

4451
status=$?

0 commit comments

Comments
 (0)