Skip to content

Commit

Permalink
pass manifest path to integration test of crates having virtual works…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
tesuji committed Oct 24, 2019
1 parent 5270d31 commit 3e8fc65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ matrix:
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=bluss/rust-itertools
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=serde-rs/serde
- env: INTEGRATION=serde-rs/serde MANIFEST_PATH=serde/Cargo.toml
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang-nursery/stdsimd
- env: INTEGRATION=rust-lang-nursery/stdsimd MANIFEST_PATH=crates/core_arch/Cargo.toml
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-random/rand
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=rust-lang-nursery/futures-rs
- env: INTEGRATION=rust-lang-nursery/futures-rs MANIFEST_PATH=futures/Cargo.toml
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
- env: INTEGRATION=Marwes/combine
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
Expand Down
9 changes: 7 additions & 2 deletions ci/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@ echo "Running integration test for crate ${INTEGRATION}"
git clone --depth=1 "https://github.com/${INTEGRATION}.git" checkout || exit 1
cd checkout || exit 1

MANIFEST_OPTS=()
if [[ -n "$MANIFEST_PATH" ]]; then
MANIFEST_OPTS=("--manifest-path=$MANIFEST_PATH")
fi

# run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
RUST_BACKTRACE=full \
cargo clippy \
--all-targets \
--all-features \
"${MANIFEST_OPTS[@]}" \
-- \
--cap-lints warn \
-W clippy::pedantic \
-W clippy::nursery \
> clippy_output 2>&1
ERRNO=$?

cat clippy_output

if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output || [[ $ERRNO -ne 0 ]]; then
if grep -q "internal compiler error\|query stack during panic\|E0463\|--all-features is not allowed" clippy_output; then
exit 1
fi

0 comments on commit 3e8fc65

Please sign in to comment.