summaryrefslogtreecommitdiffhomepage
path: root/scripts/common_build.sh
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-06-09 10:45:31 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-09 10:48:24 -0700
commit20afd66e019bf0aaaf66e854135cd2c0fe0dfd92 (patch)
tree45a756bcb7e2dfd21c351c81dd084e4f9b5e2db7 /scripts/common_build.sh
parent4e96b94915633cc06bf04bd680f4eeba6a764dc9 (diff)
Invoke bazel query via bash function.
PiperOrigin-RevId: 315514034
Diffstat (limited to 'scripts/common_build.sh')
-rwxr-xr-xscripts/common_build.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/common_build.sh b/scripts/common_build.sh
index 4fe1067d2..0d9a191b5 100755
--- a/scripts/common_build.sh
+++ b/scripts/common_build.sh
@@ -63,6 +63,10 @@ function run_as_root() {
bazel run --run_under="sudo" "${binary}" -- "$@"
}
+function query() {
+ QUERY_RESULT=$(bazel query "$@")
+}
+
function collect_logs() {
# Zip out everything into a convenient form.
if [[ -v KOKORO_ARTIFACTS_DIR ]] && [[ -e bazel-testlogs ]]; then