aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-04-11 14:01:27 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-04-12 13:57:29 +0000
commitbf066be6d1f8166101807ff94772bbeffe0252da (patch)
tree541031cbfd94001e3f59b1eb41e497286ffe21cd /src/test/shell/integration
parentd17e6b8f79a9f86fd18b102a8a7db0bbe2dd61d0 (diff)
Keep output of experimental UI short if curses cannot be used
As the experimental UI should be usable in all situations, we also have to care about the situation where updating the status bar in place is not possible. In this case, we have to make sure we do not litter the output to much. To achieve this, - we use the short one-line version of the status bar, and - reduce the frequency for time-based updates. Unfortunately, this means that we have to further complicate the timing mechanisms for updating the progress bar. We now have 3 time intervals in place: - a short one, after which we update the progress bar, if we dropped an update due to too frequent events, - an intermediate one, describing the frequency of status bar updates due to time passing, and - a long one for purely time-based updates of the progress bar if we cannot update it in place. -- Change-Id: I5d59ba174c4d290b07181620e238362a8d21a6eb Reviewed-on: https://bazel-review.googlesource.com/#/c/3295 MOS_MIGRATED_REVID=119527089
Diffstat (limited to 'src/test/shell/integration')
-rw-r--r--src/test/shell/integration/BUILD1
-rwxr-xr-xsrc/test/shell/integration/experimental_ui_test.sh13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/test/shell/integration/BUILD b/src/test/shell/integration/BUILD
index 7874f780c8..38f489d122 100644
--- a/src/test/shell/integration/BUILD
+++ b/src/test/shell/integration/BUILD
@@ -29,6 +29,7 @@ sh_test(
size = "medium",
srcs = ["experimental_ui_test.sh"],
data = [":test-deps"],
+ shard_count = 4,
)
sh_test(
diff --git a/src/test/shell/integration/experimental_ui_test.sh b/src/test/shell/integration/experimental_ui_test.sh
index 3acee96e05..ee6062ff52 100755
--- a/src/test/shell/integration/experimental_ui_test.sh
+++ b/src/test/shell/integration/experimental_ui_test.sh
@@ -191,4 +191,17 @@ function test_times_fresh {
expect_log 'Testing.*slow.*[789]s'
}
+function test_nocurses_little_output {
+ bazel clean || fail "bazel clean failed"
+ bazel test --experimental_ui --curses=no --color=yes pkg:slow 2>$TEST_log \
+ || fail "bazel test failed"
+ # We have ensured that the slow test is run. It takes about 10 seconds
+ # and we expect an update about every five second, so, in totoal, we
+ # expect to see two or three lines about the progress of the slow test.
+ # Five definitely is way off.
+ line_count=`grep 'Testing.*slow' $TEST_log | wc -l`
+ [ $line_count -lt 5 ] \
+ || fail "Too many progress updates in the log: `cat $TEST_log`"
+}
+
run_suite "Integration tests for bazel's experimental UI"