mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
test: don't apply timeout with --debug
This commit is contained in:
parent
afd3567cea
commit
6d5ef3ba2f
@ -39,9 +39,14 @@ begin
|
||||
T.cast(ENV, Stdenv).setup_build_environment(formula: formula, testing_formula: true)
|
||||
|
||||
# tests can also return false to indicate failure
|
||||
Timeout.timeout TEST_TIMEOUT_SECONDS do
|
||||
run_test = proc do
|
||||
raise "test returned false" if formula.run_test(keep_tmp: args.keep_tmp?) == false
|
||||
end
|
||||
if args.debug? # --debug is interactive
|
||||
run_test.call
|
||||
else
|
||||
Timeout.timeout(TEST_TIMEOUT_SECONDS, &run_test)
|
||||
end
|
||||
rescue Exception => e # rubocop:disable Lint/RescueException
|
||||
error_pipe.puts e.to_json
|
||||
error_pipe.close
|
||||
|
Loading…
x
Reference in New Issue
Block a user