Skip to content

Commit d6ca12a

Browse files
committed
simplify ci base-tests
1 parent 457e7f1 commit d6ca12a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

ci/base-tests.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ cd clippy_lints && cargo test && cd ..
2424
cd rustc_tools_util && cargo test && cd ..
2525
# check that the lint lists are up-to-date
2626
./util/update_lints.py -c
27-
mkdir -p ~/rust/cargo/bin
28-
cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
29-
cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
30-
rm ~/.cargo/bin/cargo-clippy
27+
28+
CLIPPY="`pwd`/target/debug/cargo-clippy clippy"
3129
# run clippy on its own codebase...
32-
PATH=$PATH:~/rust/cargo/bin cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::internal
30+
${CLIPPY} --all-targets --all-features -- -D clippy::all -D clippy::internal
3331
# ... and some test directories
34-
cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
35-
cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
36-
cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../..
37-
cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ../../..
38-
cd clippy_dev && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
39-
cd rustc_tools_util/ && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy::all && cd ..
32+
CWD_OLD=`pwd`
33+
for dir in clippy_workspace_tests clippy_workspace_tests/src clippy_workspace_tests/subcrate clippy_workspace_tests/subcrate/src clippy_dev rustc_tools_util
34+
do
35+
cd ${dir}
36+
${CLIPPY} -- -D clippy::all
37+
cd ${CWD_OLD}
38+
done
39+
4040

4141
# test --manifest-path
42-
PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy::all
43-
cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy::all && cd ../..
42+
${CLIPPY} --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy::all
43+
cd clippy_workspace_tests/subcrate && ${CLIPPY} --manifest-path=../Cargo.toml -- -D clippy::all && cd ../..
4444
set +x

0 commit comments

Comments
 (0)