Detect polygerrit test log under either bzlmod or workspace execroot The polygerrit web_test_runner path lookup used to branch on the presence of polygerrit-ui/pnpm-lock.yaml to pick between two execroot layouts: pre-bzlmod: ~/.cache/bazel/.../execroot/gerrit/bazel-out/... post-bzlmod: ~/.cache/bazel/.../execroot/_main/bazel-out/... That detection was indirect — pnpm and bzlmod are unrelated, and the presence of pnpm-lock.yaml could change for reasons that have nothing to do with the execroot name. The two branches were also otherwise identical. Replace both branches with a single wildcard on the execroot segment (execroot/*/), which matches `gerrit` and `_main` and any future rename. Drop the pnpm-lock.yaml check. Change-Id: I3e667bb6b260ec27f88417cb7a76881e5f583f86
diff --git a/jenkins/gerrit-bazel-cat-test-log.sh b/jenkins/gerrit-bazel-cat-test-log.sh index 125b188..0b3a27b 100755 --- a/jenkins/gerrit-bazel-cat-test-log.sh +++ b/jenkins/gerrit-bazel-cat-test-log.sh
@@ -7,12 +7,9 @@ echo "See test log below" echo "==============================" echo "" - if [ -f gerrit/polygerrit-ui/pnpm-lock.yaml ] + if [ -f gerrit/polygerrit-ui/web_test_runner.sh ] then - cat $(ls ~/.cache/bazel/_bazel_jenkins/*/execroot/_main/bazel-out/*/testlogs/polygerrit-ui/web_test_runner/test.log) - elif [ -f gerrit/polygerrit-ui/web_test_runner.sh ] - then - cat $(ls ~/.cache/bazel/_bazel_jenkins/*/execroot/gerrit/bazel-out/*/testlogs/polygerrit-ui/web_test_runner/test.log) + cat $(ls ~/.cache/bazel/_bazel_jenkins/*/execroot/*/bazel-out/*/testlogs/polygerrit-ui/web_test_runner/test.log) elif [ -f gerrit/polygerrit-ui/karma_test.sh ] then cat $(ls ~/.cache/bazel/_bazel_jenkins/*/execroot/gerrit/bazel-out/*/testlogs/polygerrit-ui/karma_test/test.log)