]> git.lizzy.rs Git - rust.git/blob - ci/base-tests.sh
Add license header to other files
[rust.git] / ci / base-tests.sh
1 # Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 # file at the top-level directory of this distribution and at
3 # http://rust-lang.org/COPYRIGHT.
4 #
5 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 # option. This file may not be copied, modified, or distributed
9 # except according to those terms.
10
11
12 set -ex
13
14 echo "Running clippy base tests"
15
16 PATH=$PATH:./node_modules/.bin
17 remark -f *.md > /dev/null
18 # build clippy in debug mode and run tests
19 cargo build --features debugging
20 cargo test --features debugging
21 cd clippy_lints && cargo test && cd ..
22 cd rustc_tools_util && cargo test && cd ..
23 # check that the lint lists are up-to-date
24 ./util/update_lints.py -c
25 mkdir -p ~/rust/cargo/bin
26 cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
27 cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
28 rm ~/.cargo/bin/cargo-clippy
29 # run clippy on its own codebase...
30 PATH=$PATH:~/rust/cargo/bin cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::internal
31 # ... and some test directories
32 cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
33 cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
34 cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
35 cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../../..
36 cd clippy_dev && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
37 cd rustc_tools_util/ && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
38
39 # test --manifest-path
40 PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy::all
41 cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy::all && cd ../..
42 set +x