From f61a08dda7e8cce3d1ffbe77a7d9364efd59f5b2 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 4 Oct 2022 11:21:10 -0700 Subject: [PATCH] Disable test for experimental_build_transitive_python_runfiles under non-Bazel. This behavior is being disabled within Google, so skip this test when run under Google's version of blaze. Work towards #16303 PiperOrigin-RevId: 478838783 Change-Id: Ifa37d86763e57a2fe20eca4cd4e6b4e8206e038c --- src/test/shell/integration/python_test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/shell/integration/python_test.sh b/src/test/shell/integration/python_test.sh index 34b19b3350d28d..caf2549ee8bc36 100755 --- a/src/test/shell/integration/python_test.sh +++ b/src/test/shell/integration/python_test.sh @@ -144,9 +144,15 @@ EOF # happens is Google has stamping enabled by default, which causes the # Starlark rule implementation to run an action, which then tries to run # remotely, but network access is disabled by default, so it times out. - bazel build --experimental_build_transitive_python_runfiles --nostamp :sh-tool - [ -d "bazel-bin/py-tool${EXE_EXT}.runfiles" ] || fail "py_binary runfiles tree not built" - bazel clean + + # The upcoming Starlark implementation doesn't support this behavior. + # This feature is planed for removal. + # See https://github.com/bazelbuild/bazel/issues/16303 + if [[ "$PRODUCT_NAME" == "bazel" ]]; then + bazel build --experimental_build_transitive_python_runfiles --nostamp :sh-tool + [ -d "bazel-bin/py-tool${EXE_EXT}.runfiles" ] || fail "py_binary runfiles tree not built" + bazel clean + fi bazel build --noexperimental_build_transitive_python_runfiles --nostamp :sh-tool [ ! -e "bazel-bin/py-tool${EXE_EXT}.runfiles" ] || fail "py_binary runfiles tree built" }