aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-03-24 13:26:47 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-03-24 20:05:45 +0000
commit4825696e964848c766df492955eb8ae35c900018 (patch)
treea2d760ce6c74d2ea91e8864c653fa7827a2fb106 /src/test/shell
parent4e15e43aff8cf8b8c96bc70389b4a9eb72071017 (diff)
Signal that the query command does not build
This will tell the experimental UI not to produce updates on the build status and also pass through correctly STDOUT/STDERR events. In particular, the standard output is suitable for consumption by other tools. -- Change-Id: Ifffd445433a29df20f062a762fe6280229319196 Reviewed-on: https://bazel-review.googlesource.com/#/c/3123 MOS_MIGRATED_REVID=118024251
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/integration/experimental_ui_test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/shell/integration/experimental_ui_test.sh b/src/test/shell/integration/experimental_ui_test.sh
index 07bdffc8de..deffba802a 100755
--- a/src/test/shell/integration/experimental_ui_test.sh
+++ b/src/test/shell/integration/experimental_ui_test.sh
@@ -82,4 +82,15 @@ function test_info_spacing() {
|| fail "bazel info output spaced as $BAZEL_INFO_OUTPUT"
}
+function test_query_spacing() {
+ # Verify that the output of "bazel query" is suitable for consumption by
+ # other tools, i.e., contains only result lines, separated only by newlines.
+ BAZEL_QUERY_OUTPUT=`bazel query --experimental_ui 'deps(//pkg:true)'`
+ echo "$BAZEL_QUERY_OUTPUT" | grep -q -v '^[@/]' \
+ && fail "bazel query output is >$BAZEL_QUERY_OUTPUT<"
+ echo "$BAZEL_QUERY_OUTPUT" | grep -q $'\r' \
+ && fail "bazel query output is >$BAZEL_QUERY_OUTPUT<"
+ true
+}
+
run_suite "Integration tests for bazel's experimental UI"