[前][次][番号順一覧][スレッド一覧]

ruby-changes:71188

From: Koichi <ko1@a...>
Date: Wed, 16 Feb 2022 17:57:27 +0900 (JST)
Subject: [ruby-changes:71188] 00c7a0d491 (master): fix parallel test timeout retrying

https://git.ruby-lang.org/ruby.git/commit/?id=00c7a0d491

From 00c7a0d491504b0b2b1b8723d4b70e5c24ec649c Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Wed, 16 Feb 2022 17:15:00 +0900
Subject: 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
---
 tool/lib/test/unit.rb | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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 https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L745
             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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]