summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-10-21 18:12:48 -0700
committerGitHub <noreply@github.com>2020-10-21 18:12:48 -0700
commit8060cca4946cc071ba34e067edeee029d27531a2 (patch)
tree4ce80858959cd5801f06625b0b1d1d0d0f1a46e2 /lib
parente78764caa16af8581f99855ee297d682e14f3600 (diff)
downloadspack-8060cca4946cc071ba34e067edeee029d27531a2.tar.gz
spack-8060cca4946cc071ba34e067edeee029d27531a2.tar.bz2
spack-8060cca4946cc071ba34e067edeee029d27531a2.tar.xz
spack-8060cca4946cc071ba34e067edeee029d27531a2.zip
tests: increase tolerance of termios tests (#19456)
Synchronization on GitHub macOS runners seems to be very slow, and frequently the foreground/background tests fail due to the race this causes. This increases the tolerance for slowness a bit more, to allow up to 4 spurious output lines in the tests. This should hopefully result in no more false negatives on these tests for macOS on GitHub.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/llnl/util/tty/log.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py
index 39e65f0388..c6cef00977 100644
--- a/lib/spack/spack/test/llnl/util/tty/log.py
+++ b/lib/spack/spack/test/llnl/util/tty/log.py
@@ -432,11 +432,15 @@ def test_foreground_background_output(
# output should contain mostly "on" lines, but may contain an "off"
# or two. This is because the controller toggles echo by sending "v" on
# stdin to the minion, but this is not synchronized with our locks.
- # It's good enough for a test, though. We allow at most 2 "off"'s in
+ # It's good enough for a test, though. We allow at most 4 "off"'s in
# the output to account for the race.
+ #
+ # Originally we only allowed 2, but GitHub's macOS runners seem to be
+ # very slow, and frequently we get 3 "off"'s. Increased limit to 4 to
+ # account for this. Real errors should still be caught with this limit.
assert (
['forced output', 'on'] == uniq(output) or
- output.count("off") <= 2 # if controller_fd is a bit slow
+ output.count("off") <= 4 # if controller_fd is a bit slow
)
# log should be off for a while, then on, then off