Configure uhwm_wait_output test helper via the env

The `timeout' keyword argument was never used, replace it with a test
for UHWMTEST_OUTPUT_TIMEOUT environment variable and use the value when
set.
This commit is contained in:
Thibault Jouan 2015-04-16 17:31:56 +00:00
parent 1e1645107c
commit c7f3743949

View File

@ -22,7 +22,10 @@ module Uh
@process.stdout
end
def uhwm_wait_output message, timeout: 1
def uhwm_wait_output message
timeout = ENV.key?('UHWMTEST_OUTPUT_TIMEOUT') ?
ENV['UHWMTEST_OUTPUT_TIMEOUT'].to_i :
1
Timeout.timeout(timeout) do
loop do
break if case message