зеркало из https://github.com/github/ruby.git
Kill bundled gem tests when interrupted
This commit is contained in:
Родитель
114f85ecec
Коммит
e0a7e5e131
|
@ -1407,7 +1407,7 @@ no-test-bundled-gems:
|
|||
|
||||
BUNDLED_GEMS =
|
||||
test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
|
||||
$(Q) $(XRUBY) $(tooldir)/test-bundled-gems.rb $(BUNDLED_GEMS)
|
||||
$(gnumake_recursive)$(Q) $(XRUBY) $(tooldir)/test-bundled-gems.rb $(BUNDLED_GEMS)
|
||||
|
||||
test-bundler-precheck: $(TEST_RUNNABLE)-test-bundler-precheck
|
||||
no-test-bundler-precheck:
|
||||
|
|
|
@ -71,15 +71,23 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
|
|||
break Timeout.timeout(sec) {Process.wait(pid)}
|
||||
rescue Timeout::Error
|
||||
end
|
||||
rescue Interrupt
|
||||
exit_code = Signal.list["INT"]
|
||||
Process.kill("-KILL", pid)
|
||||
Process.wait(pid)
|
||||
break
|
||||
end
|
||||
|
||||
unless $?.success?
|
||||
puts "Tests failed with exit code #{$?.exitstatus}"
|
||||
|
||||
puts "Tests failed " +
|
||||
($?.signaled? ? "by SIG#{Signal.signame($?.termsig)}" :
|
||||
"with exit code #{$?.exitstatus}")
|
||||
if allowed_failures.include?(gem)
|
||||
puts "Ignoring test failures for #{gem} due to \$TEST_BUNDLED_GEMS_ALLOW_FAILURES"
|
||||
else
|
||||
failed << gem
|
||||
exit_code = $?.exitstatus
|
||||
exit_code = $?.exitstatus if $?.exitstatus
|
||||
end
|
||||
end
|
||||
print "##[endgroup]\n" if github_actions
|
||||
|
|
Загрузка…
Ссылка в новой задаче