diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-17 22:34:23 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-17 22:40:31 +0900 |
commit | c7eac1be518912bde3e2f22623b1398eb1b950f2 (patch) | |
tree | 1bd6c69fa6cec70785d0689df0a6cd60c8d2d12f /tool/lib | |
parent | 13716898df666210b9067c8a3d05a162c2a6ed66 (diff) | |
download | ruby-c7eac1be518912bde3e2f22623b1398eb1b950f2.tar.gz |
Retry hung up tests verbosely
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/test/unit.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index 6b9bebce62..c58a609bfa 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -730,14 +730,23 @@ module Test } suites.map {|r| File.realpath(r[:file])}.uniq.each {|file| require file} del_status_line or puts + error, suites = suites.partition {|r| r[:error]} unless suites.empty? puts "\n""Retrying..." @verbose = options[:verbose] - error, suites = suites.partition {|r| r[:error]} suites.map! {|r| ::Object.const_get(r[:testcase])} - error.map! {|r| ::Object.const_get(r[:testcase])} _run_suites(suites, type) + end + unless error.empty? + puts "\n""Retrying hung up testcases..." + error.map! {|r| ::Object.const_get(r[:testcase])} + verbose = @verbose + job_status = options[:job_status] + options[:verbose] = @verbose = true + options[:job_status] = :normal result.concat _run_suites(error, type) + options[:verbose] = @verbose = verbose + options[:job_status] = job_status end @options[:parallel] = parallel end @@ -915,7 +924,7 @@ module Test end def jobs_status(worker) - return if !@options[:job_status] or @options[:verbose] + return if !@options[:job_status] or @verbose if @options[:job_status] == :replace status_line = @workers.map(&:to_s).join(" ") else |