Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/scripts/github-actions/bazel-test-if-targets.sh
11810 views
1
#!/usr/bin/env bash
2
# Wrap `bazel test` so that exit code 4 (no test targets matched the
3
# configured filters) is reported as a notice and treated as success.
4
# Keeps `inputs.run` a single command word so rerun-failures.sh can
5
# strip ` //...` targets and re-append failed ones without mangling
6
# shell control characters.
7
8
set -uo pipefail
9
10
code=0
11
bazel test "$@" || code=$?
12
13
case "$code" in
14
0) exit 0 ;;
15
4)
16
echo "::notice::No test targets matched the configured filters"
17
exit 0
18
;;
19
*) exit "$code" ;;
20
esac
21
22