test: don't apply timeout with --debug

This commit is contained in:
Bo Anderson 2021-03-25 16:50:42 +00:00
parent afd3567cea
commit 6d5ef3ba2f
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -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