Skip to content

Commit

Permalink
Merge branch 'main' into update-docker-build-chpasswd
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiy0006 committed Jul 12, 2024
2 parents a80f8fa + 1f16e38 commit efd2ba2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ci/cloudbuild/builds/lib/cloudcxxrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ fi
function bazel::has_no_tests() {
local target=$1
shift
if [[ "${#BAZEL_TARGETS[@]}" -eq 0 ]]; then
return 0
fi
query_expr="$(printf '+ %s' "${BAZEL_TARGETS[@]}")"
query_expr="tests(${query_expr:2} intersect ${target})"
if ! bazel query --noshow_progress "${query_expr}" | grep -q "${target}"; then
# Tolerate failures in `bazel` as a workaround for:
# https://github.com/bazelbuild/bazel/issues/14787
if ! (bazel query --noshow_progress "${query_expr}" || true) | grep -q "${target}"; then
return 0
fi
return 1
Expand Down

0 comments on commit efd2ba2

Please sign in to comment.