Invoke bazel query via bash function.

PiperOrigin-RevId: 315514034
This commit is contained in:
Kevin Krakauer
2020-06-09 10:48:24 -07:00
committed by gVisor bot
parent 4e96b94915
commit 20afd66e01
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -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
+2 -1
View File
@@ -19,4 +19,5 @@ source $(dirname $0)/common.sh
make load-packetdrill
install_runsc_for_test runsc-d
test_runsc $(bazel query "attr(tags, manual, tests(//test/packetdrill/...))")
query "attr(tags, manual, tests(//test/packetdrill/...))"
test_runsc $QUERY_RESULT
+2 -1
View File
@@ -19,4 +19,5 @@ source $(dirname $0)/common.sh
make load-packetimpact
install_runsc_for_test runsc-d
test_runsc $(bazel query "attr(tags, packetimpact, tests(//test/packetimpact/...))")
query "attr(tags, packetimpact, tests(//test/packetimpact/...))"
test_runsc $QUERY_RESULT