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