Skip to content

Commit 008ce56

Browse files
authored
Replace global starter flags with call-specific flags (tensorflow#22203)
The earlier version of convenient default flags mistakenly applied --build_tests_only to normal "bazel build" calls, which broke pip.sh (and probably invalidated some other things). This resolves that problem by setting flags specific to "test" and "build" commands. PiperOrigin-RevId: 212355193
1 parent c483af4 commit 008ce56

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tensorflow/tools/ci_build/ci_parameterized_build.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,19 @@ NO_DOCKER_OPT_FLAG="--genrule_strategy=standalone"
127127

128128
DO_DOCKER=1
129129

130-
BAZEL_CMD="bazel test"
131-
BAZEL_BUILD_ONLY_CMD="bazel build"
132-
BAZEL_CLEAN_CMD="bazel clean"
133130

134-
# Default flags:
131+
# Helpful flags:
135132
# --test_summary=detailed: Tell us more about which targets are being built
136133
# --keep_going: Don't stop at the first failure; tell us all the failures
137134
# --build_tests_only: Don't build targets depended on by tests if the test is
138135
# disabled. Also saves some compilation time. Otherwise,
139136
# tries to build everything.
140-
DEFAULT_BAZEL_CONFIGS="--test_summary=detailed --build_tests_only --keep_going"
137+
BAZEL_TEST_FLAGS="--test_summary=detailed --build_tests_only --keep_going"
138+
BAZEL_BUILD_FLAGS="--keep_going"
139+
140+
BAZEL_CMD="bazel test ${BAZEL_TEST_FLAGS}"
141+
BAZEL_BUILD_ONLY_CMD="bazel build ${BAZEL_BUILD_FLAGS}"
142+
BAZEL_CLEAN_CMD="bazel clean"
141143

142144
PIP_CMD="${CI_BUILD_DIR}/builds/pip.sh"
143145
PIP_TEST_TUTORIALS_FLAG="--test_tutorials"
@@ -393,7 +395,7 @@ fi
393395
EXTRA_ARGS="${EXTRA_ARGS} --distinct_host_configuration=false"
394396

395397
if [[ ! -z "${TF_BAZEL_BUILD_ONLY}" ]] &&
396-
[[ "${TF_BAZEL_BUILD_ONLY}" != "0" ]];then
398+
[[ "${TF_BAZEL_BUILD_ONLY}" != "0" ]];then
397399
BAZEL_CMD=${BAZEL_BUILD_ONLY_CMD}
398400
fi
399401

0 commit comments

Comments
 (0)