From f2ffc3d7e1833f16d3d1ebcef38e5aeb5c87167a Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Fri, 18 Oct 2019 11:10:15 +0700 Subject: [PATCH] build: use shared target dir --- ci/base-tests.sh | 8 +++++--- util/dev | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 1043f7474a6b..e0b38b9aa45d 100755 --- a/ci/base-tests.sh +++ b/ci/base-tests.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -ex +# for faster build, share target dir between subcrates +CARGO_TARGET_DIR=$(pwd)/target/ +export CARGO_TARGET_DIR + echo "Running clippy base tests" PATH=$PATH:./node_modules/.bin @@ -10,9 +14,7 @@ fi # build clippy in debug mode and run tests cargo build --features "debugging deny-warnings" cargo test --features "debugging deny-warnings" -# for faster build, share target dir between subcrates -CARGO_TARGET_DIR=$(pwd)/target/ -export CARGO_TARGET_DIR + (cd clippy_lints && cargo test) (cd rustc_tools_util && cargo test) (cd clippy_dev && cargo test) diff --git a/util/dev b/util/dev index 4fa6e69b7527..8e3ed97f98d5 100755 --- a/util/dev +++ b/util/dev @@ -1,3 +1,5 @@ #!/bin/sh +CARGO_TARGET_DIR=$(pwd)/target/ +export CARGO_TARGET_DIR -cd clippy_dev && cargo run -- $@ +cd clippy_dev && cargo run -- "$@"