Skip to content

Commit b07f1b0

Browse files
committed
base-tests: use subshells to manage current directory
It saves on having to pair `cd <path> && think && cd ..`.
1 parent 993e8ac commit b07f1b0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ci/base-tests.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ cargo build --features debugging
1111
cargo test --features debugging
1212
# for faster build, share target dir between subcrates
1313
export CARGO_TARGET_DIR=`pwd`/target/
14-
cd clippy_lints && cargo test && cd ..
15-
cd rustc_tools_util && cargo test && cd ..
16-
cd clippy_dev && cargo test && cd ..
14+
(cd clippy_lints && cargo test)
15+
(cd rustc_tools_util && cargo test)
16+
(cd clippy_dev && cargo test)
1717

1818
# make sure clippy can be called via ./path/to/cargo-clippy
19-
cd clippy_workspace_tests
20-
../target/debug/cargo-clippy
21-
cd ..
19+
(
20+
cd clippy_workspace_tests
21+
../target/debug/cargo-clippy
22+
)
2223

2324
# Perform various checks for lint registration
2425
./util/dev update_lints --check

0 commit comments

Comments
 (0)