From bf066be6d1f8166101807ff94772bbeffe0252da Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 11 Apr 2016 14:01:27 +0000 Subject: 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 --- src/test/shell/integration/BUILD | 1 + src/test/shell/integration/experimental_ui_test.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'src/test/shell/integration') 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" -- cgit v1.2.3