]> git.lizzy.rs Git - rust.git/blob - ci/integration-tests.sh
Early exit in integration tests
[rust.git] / ci / integration-tests.sh
1 #!/usr/bin/env bash
2 set -ex
3
4 if [[ -z "$INTEGRATION" ]]; then
5     exit 0
6 fi
7
8 CARGO_TARGET_DIR=$(pwd)/target/
9 export CARGO_TARGET_DIR
10
11 rm ~/.cargo/bin/cargo-clippy
12 cargo install --force --debug --path .
13
14 echo "Running integration test for crate ${INTEGRATION}"
15
16 git clone --depth=1 "https://github.com/${INTEGRATION}.git" checkout
17 cd checkout
18
19 # run clippy on a project, try to be verbose and trigger as many warnings
20 # as possible for greater coverage
21 RUST_BACKTRACE=full \
22 cargo clippy \
23     --all-targets \
24     --all-features \
25     -- \
26     --cap-lints warn \
27     -W clippy::pedantic \
28     -W clippy::nursery \
29     > clippy_output 2>&1 || true
30
31 cat clippy_output
32
33 if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output; then
34     exit 1
35 fi