From cf63376524174aa7c3f11f9b3cfee47b05e073b5 Mon Sep 17 00:00:00 2001 From: Dong Li Date: Mon, 21 Aug 2017 10:38:06 -0700 Subject: [PATCH] build: moved bazel startup config to bazel.rc * build and test won't clean up each other --- apollo.sh | 4 ++-- tools/bazel.rc | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apollo.sh b/apollo.sh index ac1d7f9135..6c637bcd43 100755 --- a/apollo.sh +++ b/apollo.sh @@ -316,7 +316,7 @@ function run_test() { # FIXME(all): when all unit test passed, switch back. # bazel test --config=unit_test -c dbg //... generate_test_targets_dbg - echo "$TEST_TARGETS" | xargs bazel test $DEFINES --config=unit_test -c dbg --test_verbose_timeout_warnings + echo "$TEST_TARGETS" | xargs bazel --batch --batch_cpu_scheduling test $DEFINES --config=unit_test -c dbg --test_verbose_timeout_warnings if [ $? -ne 0 ]; then fail "Test failed!" return 1 @@ -324,7 +324,7 @@ function run_test() { generate_test_targets_opt build_caffe_opt - echo "$TEST_TARGETS" | xargs bazel test $DEFINES --config=unit_test -c opt --test_verbose_timeout_warnings + echo "$TEST_TARGETS" | xargs bazel --batch --batch_cpu_scheduling test $DEFINES --config=unit_test -c opt --test_verbose_timeout_warnings if [ $? -eq 0 ]; then success 'Test passed!' return 0 diff --git a/tools/bazel.rc b/tools/bazel.rc index d00461a7ae..8f952900fa 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -1,3 +1,8 @@ +# +------------------------------------------------------------+ +# | Startup Options | +# +------------------------------------------------------------+ +startup --batch --batch_cpu_scheduling + # +------------------------------------------------------------+ # | Test Configurations | # +------------------------------------------------------------+ -- GitLab