Skip to content

Commit 6749b2d

Browse files
authored
Merge pull request #2966 from matthiaskrgr/moar_dogfood
travis: run tests of external projects with --all-targets --all-features, increase coverage
2 parents d7ffaab + a2343bf commit 6749b2d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ci/base-tests.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
set -ex
2+
3+
echo "Running clippy base tests"
4+
25
PATH=$PATH:./node_modules/.bin
36
remark -f *.md > /dev/null
7+
# build clippy in debug mode and run tests
48
cargo build --features debugging
59
cargo test --features debugging
610
mkdir -p ~/rust/cargo/bin
711
cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
812
cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
913
rm ~/.cargo/bin/cargo-clippy
10-
PATH=$PATH:~/rust/cargo/bin cargo clippy --all -- -D clippy
14+
# run clippy on its own codebase...
15+
PATH=$PATH:~/rust/cargo/bin cargo clippy --all-targets --all-features -- -D clippy
16+
# ... and some test directories
1117
cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
1218
cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
1319
cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
1420
cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
21+
# test --manifest-path
1522
PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
1623
cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
1724
set +x

ci/integration-tests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ git clone --depth=1 https://github.com/${INTEGRATION}.git checkout
88
cd checkout
99

1010
function check() {
11-
RUST_BACKTRACE=full cargo clippy --all &> clippy_output
11+
# run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
12+
RUST_BACKTRACE=full cargo clippy --all-targets --all-features -- --cap-lints warn -W clippy_pedantic -W clippy_nursery &> clippy_output
1213
cat clippy_output
13-
! cat clippy_output | grep -q "internal compiler error"
14+
! cat clippy_output | grep -q "internal compiler error\|query stack during panic"
1415
if [[ $? != 0 ]]; then
1516
return 1
1617
fi

0 commit comments

Comments
 (0)