aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration/experimental_ui_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/shell/integration/experimental_ui_test.sh')
-rwxr-xr-xsrc/test/shell/integration/experimental_ui_test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/shell/integration/experimental_ui_test.sh b/src/test/shell/integration/experimental_ui_test.sh
index e411b53904..bb1f2c3f9c 100755
--- a/src/test/shell/integration/experimental_ui_test.sh
+++ b/src/test/shell/integration/experimental_ui_test.sh
@@ -35,6 +35,12 @@ function set_up() {
exit 0
EOF
chmod 755 pkg/true.sh
+ cat > pkg/slow.sh <<EOF
+#!/bin/sh
+sleep 10
+exit 0
+EOF
+ chmod 755 pkg/slow.sh
cat > pkg/false.sh <<EOF
#!/bin/sh
exit 1
@@ -46,6 +52,10 @@ sh_test(
srcs = ["true.sh"],
)
sh_test(
+ name = "slow",
+ srcs = ["slow.sh"],
+)
+sh_test(
name = "false",
srcs = ["false.sh"],
)
@@ -169,4 +179,16 @@ function test_loading_progress {
expect_log 'Loading.*[0-9,]* / [0-9,]*'
}
+function test_times_fresh {
+ bazel clean || fail "bazel clean failed"
+ bazel test --experimental_ui --curses=yes --color=yes pkg:slow 2>$TEST_log \
+ || fail "bazel test failed"
+ # We have ensured that the slow test is run. It takes at least 10 seconds
+ # and we expect an update about once per second. Due to lack of knowledge
+ # of the phasing, we cannot expect a particular run-time to be visible;
+ # however, if none of three adjacent seconds are shown in the upddate the
+ # refreshing is certainly not working.
+ expect_log 'Testing.*slow.*[789]s'
+}
+
run_suite "Integration tests for bazel's experimental UI"