Skip to content

Commit

Permalink
Avoid false positive failures of b_time.exp
Browse files Browse the repository at this point in the history
  • Loading branch information
krader1961 committed Jan 10, 2020
1 parent 3bc5816 commit 80cc081
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cmd/ksh93/tests/b_time.exp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ expect_prompt

# ==========
# Timing a more complex pipeline works.
#
# That the regex allows elapsed-time values as large as 0.199 is because the Travis CI macOS
# environment tends to be horribly overloaded, and thus slow. Which means this test often takes a
# bit more than 0.1 seconds which causes the test to fail if a more restrictive regex is used.
log_test_entry
send "time { sleep 0.05 | sleep 0.05; }\r"
expect -re "\r\nreal\[\t \]*0m0\.0\[0-9\]\[0-9\]s\r\ncpu$zero_sec_re\r\n" {
expect -re "\r\nreal\[\t \]*0m0\.\[01\]\[0-9\]\[0-9\]s\r\ncpu$zero_sec_re\r\n" {
puts "time sleep 0.05 pipeline produces expected output"
}
expect_prompt
Expand Down

0 comments on commit 80cc081

Please sign in to comment.