]> git.lizzy.rs Git - rust.git/blob - ci/integration-tests.sh
Merge remote-tracking branch 'upstream/rust-1.36.0' into backport_merge
[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 || exit 1
18
19 # run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
20 RUST_BACKTRACE=full \
21 cargo clippy \
22     --all-targets \
23     --all-features \
24     -- --cap-lints warn -W clippy::pedantic -W clippy::nursery \
25     2>& 1 \
26 | tee clippy_output
27
28 if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output; then
29     exit 1
30 fi