From 0564b83ee58f4bf3299e437ad23e26e0fbf9cb52 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 18 Oct 2022 17:07:50 -0700 Subject: [PATCH] Skip testing building py_library for Python 2 in python_stub_test. The skip is based on product name because Bazel isn't yet using the Starlark implementation. Work towards #15897 PiperOrigin-RevId: 482060695 Change-Id: Idfbd615b55f805ecc2a9f4ba83e23df21ce94189 --- src/test/shell/integration/python_stub_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/shell/integration/python_stub_test.sh b/src/test/shell/integration/python_stub_test.sh index 1c30dbd2e3e97e..02e2a0118b913c 100755 --- a/src/test/shell/integration/python_stub_test.sh +++ b/src/test/shell/integration/python_stub_test.sh @@ -115,8 +115,11 @@ py_library( EOF touch test/lib2.py test/lib3.py - bazel build --python_version=PY2 //test:* \ - &> $TEST_log || fail "bazel build failed" + # Python 2 support dropped in Google builds + if [[ "$PRODUCT_NAME" == "bazel" ]]; then + bazel build --python_version=PY2 //test:* \ + &> $TEST_log || fail "bazel build failed" + fi bazel build --python_version=PY3 //test:* \ &> $TEST_log || fail "bazel build failed" }