summaryrefslogtreecommitdiff
path: root/tool/lib/test
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-02-16 17:15:00 +0900
committerKoichi Sasada <ko1@atdot.net>2022-02-16 17:57:04 +0900
commit00c7a0d491504b0b2b1b8723d4b70e5c24ec649c (patch)
tree8add7c196429b62a58190cf0369ec3d2556360bf /tool/lib/test
parentb9851c7e1b1cbc13b050831b0429e7a4097e11b7 (diff)
fix parallel test timeout retrying
On the parallel test, workers can be killed because of timeout and the information for the retrying can be inconsistent. This patch will skip if the inconsistency is found and report as an error. http://ci.rvm.jp/results/trunk-asserts@phosphorus-docker/3834082
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5559
Diffstat (limited to 'tool/lib/test')
-rw-r--r--tool/lib/test/unit.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index f4f44f8010..0c752c0fa7 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -745,7 +745,19 @@ module Test
end
unless error.empty?
puts "\n""Retrying hung up testcases..."
- error.map! {|r| ::Object.const_get(r[:testcase])}
+ error = error.map do |r|
+ begin
+ ::Object.const_get(r[:testcase])
+ rescue NameError
+ # testcase doesn't specify the correct case, so show `r` for information
+ require 'pp'
+
+ $stderr.puts "Retrying is failed because the file and testcase is not consistent:"
+ PP.pp r, $stderr
+ @errors += 1
+ nil
+ end
+ end.compact
verbose = @verbose
job_status = options[:job_status]
options[:verbose] = @verbose = true