Temporarily add two bazel flags to test with an older version of bazel. This will be rolled back in at most 1 hour since submission

PiperOrigin-RevId: 257515069
This commit is contained in:
Mihai Maruseac 2019-07-10 17:19:06 -07:00 committed by TensorFlower Gardener
parent 6e03f9430a
commit 08370f31ad
3 changed files with 12 additions and 3 deletions

View File

@ -449,6 +449,8 @@ do_bazel_nobuild() {
BUILD_TARGET="${BUILD_TARGET} -//tensorflow/lite/delegates/gpu/..."
BUILD_TARGET="${BUILD_TARGET} -//tensorflow/lite/java/demo/app/..."
BUILD_TARGET="${BUILD_TARGET} -//tensorflow/lite/schema/..."
BAZEL_FLAGS="${BAZEL_FLAGS} --incompatible_package_name_is_a_function=false"
BAZEL_FLAGS="${BAZEL_FLAGS} --incompatible_remove_native_http_archive=false"
BUILD_CMD="bazel build --nobuild ${BAZEL_FLAGS} -- ${BUILD_TARGET}"
${BUILD_CMD}

View File

@ -47,6 +47,8 @@ def main():
try:
targets = subprocess.check_output([
'bazel', 'query',
"--incompatible_package_name_is_a_function=false",
"--incompatible_remove_native_http_archive=false",
'kind(py_test, //tensorflow/contrib/... + '
'//tensorflow/python/... - '
'//tensorflow/contrib/tensorboard/...)']).strip()

View File

@ -30,6 +30,10 @@ os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")))
PIP_PACKAGE_QUERY_EXPRESSION = (
"deps(//tensorflow/tools/pip_package:build_pip_package)")
RELEASE_PATCH_FLAGS = (
" --incompatible_package_name_is_a_function=false"
" --incompatible_remove_native_http_archive=false")
# List of file paths containing BUILD files that should not be included for the
# pip smoke test.
BUILD_BLACKLIST = [
@ -140,7 +144,7 @@ def main():
# pip_package_dependencies_list is the list of included files in pip packages
pip_package_dependencies = subprocess.check_output(
["bazel", "cquery", PIP_PACKAGE_QUERY_EXPRESSION])
["bazel", "cquery", RELEASE_PATCH_FLAGS, PIP_PACKAGE_QUERY_EXPRESSION])
if isinstance(pip_package_dependencies, bytes):
pip_package_dependencies = pip_package_dependencies.decode("utf-8")
pip_package_dependencies_list = pip_package_dependencies.strip().split("\n")
@ -152,7 +156,7 @@ def main():
# tf_py_test_dependencies is the list of dependencies for all python
# tests in tensorflow
tf_py_test_dependencies = subprocess.check_output(
["bazel", "cquery", PY_TEST_QUERY_EXPRESSION])
["bazel", "cquery", RELEASE_PATCH_FLAGS, PY_TEST_QUERY_EXPRESSION])
if isinstance(tf_py_test_dependencies, bytes):
tf_py_test_dependencies = tf_py_test_dependencies.decode("utf-8")
tf_py_test_dependencies_list = tf_py_test_dependencies.strip().split("\n")
@ -193,7 +197,8 @@ def main():
print("Affected Tests:")
rdep_query = ("rdeps(kind(py_test, %s), %s)" %
(" + ".join(PYTHON_TARGETS), missing_dependency))
affected_tests = subprocess.check_output(["bazel", "cquery", rdep_query])
affected_tests = subprocess.check_output(
["bazel", "cquery", RELEASE_PATCH_FLAGS, rdep_query])
affected_tests_list = affected_tests.split("\n")[:-2]
print("\n".join(affected_tests_list))