fix ci: stop on test compilation error
@@ -29,15 +29,18 @@ setup:
cargo install --force --vers 0.9.0 rustfmt
test:
- $(CARGO) test --release --all --no-fail-fast |tee target/test.log
+ $(CARGO) test --release --all --no-fail-fast 2>&1 |tee target/test.log
@grep 'test result' target/test.log |awk '\
BEGIN { passed=0; failed=0; ignored=0; measured=0; filter=0; } \
{ passed+=$$4; failed+=$$6; ignored+=$$8; measured+=$$10; filter+=$$12; } \
END { printf "passed=%d; failed=%d; ignored=%d; measured=%d; filter=%d\n", passed, failed, ignored, measured, filter; }'
@echo "################################################################################"
- @echo "failed testcase:"
+ @echo "test error:"
+ @grep -A 2 'error\[' target/test.log || exit 0
+ @echo "################################################################################"
+ @echo "test result:"
@grep '\.\.\. FAILED' target/test.log ||true
- @grep -q '\.\.\. FAILED' target/bench.log; if [ $$? -eq 0 ] ; then exit 1; fi;
+ @grep -q '\.\.\. FAILED' target/test.log; if [ $$? -eq 0 ] ; then exit 1; fi;
bench:
-rm -f target/bench.log
