aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/ci_build/builds/run_pip_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tools/ci_build/builds/run_pip_tests.sh')
-rwxr-xr-xtensorflow/tools/ci_build/builds/run_pip_tests.sh24
1 files changed, 11 insertions, 13 deletions
diff --git a/tensorflow/tools/ci_build/builds/run_pip_tests.sh b/tensorflow/tools/ci_build/builds/run_pip_tests.sh
index be076cd4c0..10bed0b786 100755
--- a/tensorflow/tools/ci_build/builds/run_pip_tests.sh
+++ b/tensorflow/tools/ci_build/builds/run_pip_tests.sh
@@ -104,28 +104,26 @@ export TF_NEED_CUDA=$IS_GPU
yes "" | ./configure
# Figure out how many concurrent tests we can run and do run the tests.
+BAZEL_PARALLEL_TEST_FLAGS=""
if [[ $IS_GPU == 1 ]]; then
# Number of test threads is the number of GPU cards available.
if [[ $IS_MAC == 1 ]]; then
- PAR_TEST_JOBS=1
+ BAZEL_PARALLEL_TEST_FLAGS="--local_test_jobs=1"
else
PAR_TEST_JOBS=$TF_GPU_COUNT
+ BAZEL_PARALLEL_TEST_FLAGS="--local_test_jobs=${TF_GPU_COUNT} \
+ --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute"
fi
-
- # Actually run the tests.
- bazel test ${BAZEL_FLAGS} --local_test_jobs=${PAR_TEST_JOBS} \
- --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute \
- -- ${BAZEL_TEST_TARGETS}
-
else
# Number of test threads is the number of physical CPUs.
if [[ $IS_MAC == 1 ]]; then
- PAR_TEST_JOBS=$(sysctl -n hw.ncpu)
+ BAZEL_PARALLEL_TEST_FLAGS="--local_test_jobs=$(sysctl -n hw.ncpu)"
else
- PAR_TEST_JOBS=$(grep -c ^processor /proc/cpuinfo)
+ BAZEL_PARALLEL_TEST_FLAGS="--local_test_jobs=$(grep -c ^processor /proc/cpuinfo)"
fi
-
- # Actually run the tests.
- bazel test ${BAZEL_FLAGS} --local_test_jobs=${PAR_TEST_JOBS} \
- -- ${BAZEL_TEST_TARGETS}
fi
+
+# Actually run the tests.
+bazel test ${BAZEL_FLAGS} ${BAZEL_PARALLEL_TEST_FLAGS} -- \
+ ${BAZEL_TEST_TARGETS}
+