From b07f1b097493809045c92bb3ca09b5792310e5a5 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Sat, 26 Jan 2019 17:49:29 -0800 Subject: [PATCH] base-tests: use subshells to manage current directory It saves on having to pair `cd && think && cd ..`. --- ci/base-tests.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 6675c795b..17eec3a41 100755 --- a/ci/base-tests.sh +++ b/ci/base-tests.sh @@ -11,14 +11,15 @@ cargo build --features debugging cargo test --features debugging # for faster build, share target dir between subcrates export CARGO_TARGET_DIR=`pwd`/target/ -cd clippy_lints && cargo test && cd .. -cd rustc_tools_util && cargo test && cd .. -cd clippy_dev && cargo test && cd .. +(cd clippy_lints && cargo test) +(cd rustc_tools_util && cargo test) +(cd clippy_dev && cargo test) # make sure clippy can be called via ./path/to/cargo-clippy -cd clippy_workspace_tests -../target/debug/cargo-clippy -cd .. +( + cd clippy_workspace_tests + ../target/debug/cargo-clippy +) # Perform various checks for lint registration ./util/dev update_lints --check