]> git.lizzy.rs Git - rust.git/blob - ci/base-tests.sh
Merge pull request #3197 from mikerite/travis_lint_list
[rust.git] / ci / base-tests.sh
1 set -ex
2
3 echo "Running clippy base tests"
4
5 PATH=$PATH:./node_modules/.bin
6 remark -f *.md > /dev/null
7 # build clippy in debug mode and run tests
8 cargo build --features debugging
9 cargo test --features debugging
10 cd clippy_lints && cargo test && cd ..
11 cd rustc_tools_util && cargo test && cd ..
12 # check that the lint lists are up-to-date
13 ./util/update_lints.py -c
14 mkdir -p ~/rust/cargo/bin
15 cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
16 cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
17 rm ~/.cargo/bin/cargo-clippy
18 # run clippy on its own codebase...
19 PATH=$PATH:~/rust/cargo/bin cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::internal
20 # ... and some test directories
21 cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
22 cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
23 cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
24 cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../../..
25 cd clippy_dev && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
26 cd rustc_tools_util/ && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
27
28 # test --manifest-path
29 PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy::all
30 cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy::all && cd ../..
31 set +x