From 7a489b17fcdb17577244f7447b4985a28c5fe837 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 9 Aug 2023 11:13:08 -0700 Subject: [PATCH] Fix copybara to also transform tests with strange names. Working towards: https://github.com/bazelbuild/bazel/issues/18957 PiperOrigin-RevId: 555218827 Change-Id: I43dd9a581bec70f179c07d98f2f17d1cb4e4252e --- src/test/shell/integration/execution_phase_tests.sh | 7 ++++--- .../target_compatible_with_test_external_repo.sh | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/shell/integration/execution_phase_tests.sh b/src/test/shell/integration/execution_phase_tests.sh index 61376e24a37e37..1c8e5e536b9b1c 100755 --- a/src/test/shell/integration/execution_phase_tests.sh +++ b/src/test/shell/integration/execution_phase_tests.sh @@ -20,9 +20,9 @@ # --- begin runfiles.bash initialization v3 --- # Copy-pasted from the Bazel Bash runfiles library v3. -set -uo pipefail; set +e; f=io_bazel/tools/bash/runfiles/runfiles.bash -source "${TEST_SRCDIR:-/dev/null}/$f" 2>/dev/null || \ - source "$(grep -sm1 "^$f " "${TEST_SRCDIR:-/dev/null}/MANIFEST" | cut -f2- -d' ')" 2>/dev/null || \ +set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash +source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ source "$0.runfiles/$f" 2>/dev/null || \ source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ @@ -457,3 +457,4 @@ EOF } run_suite "Integration tests of ${PRODUCT_NAME} using the execution phase." + diff --git a/src/test/shell/integration/target_compatible_with_test_external_repo.sh b/src/test/shell/integration/target_compatible_with_test_external_repo.sh index 17ddc277f73de6..c9ec4020ccf629 100755 --- a/src/test/shell/integration/target_compatible_with_test_external_repo.sh +++ b/src/test/shell/integration/target_compatible_with_test_external_repo.sh @@ -18,9 +18,9 @@ # --- begin runfiles.bash initialization v3 --- # Copy-pasted from the Bazel Bash runfiles library v3. -set -uo pipefail; set +e; f=io_bazel/tools/bash/runfiles/runfiles.bash -source "${TEST_SRCDIR:-/dev/null}/$f" 2>/dev/null || \ - source "$(grep -sm1 "^$f " "${TEST_SRCDIR:-/dev/null}/MANIFEST" | cut -f2- -d' ')" 2>/dev/null || \ +set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash +source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ source "$0.runfiles/$f" 2>/dev/null || \ source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \