Skip to content

Commit 55883d8

Browse files
committed
Early exit in integration tests
1 parent 9a2e500 commit 55883d8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

ci/integration-tests.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,27 @@ if [[ -z "$INTEGRATION" ]]; then
66
fi
77

88
rm ~/.cargo/bin/cargo-clippy
9-
cargo install --force --debug --path .
9+
cargo install --force --debug --path . || exit 1
1010

1111
echo "Running integration test for crate ${INTEGRATION}"
1212

13-
git clone --depth=1 "https://github.com/${INTEGRATION}.git" checkout
13+
git clone --depth=1 "https://github.com/${INTEGRATION}.git" checkout || exit 1
1414
cd checkout || exit 1
1515

1616
# run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
1717
RUST_BACKTRACE=full \
1818
cargo clippy \
1919
--all-targets \
2020
--all-features \
21-
-- --cap-lints warn -W clippy::pedantic -W clippy::nursery \
22-
2>& 1 \
23-
| tee clippy_output
21+
-- \
22+
--cap-lints warn \
23+
-W clippy::pedantic \
24+
-W clippy::nursery \
25+
> clippy_output 2>&1
26+
ERRNO=$?
2427

25-
if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output; then
28+
cat clippy_output
29+
30+
if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output || [[ $ERRNO -ne 0 ]]; then
2631
exit 1
2732
fi

0 commit comments

Comments
 (0)