mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Retry hung up tests verbosely
This commit is contained in:
		
							parent
							
								
									13716898df
								
							
						
					
					
						commit
						c7eac1be51
					
				
					 2 changed files with 13 additions and 4 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
|  | @ -212,7 +212,7 @@ module TestParallel | |||
|     def test_hungup | ||||
|       spawn_runner "--worker-timeout=1", "test4test_hungup.rb" | ||||
|       buf = Timeout.timeout(TIMEOUT) {@test_out.read} | ||||
|       assert_match(/^Retrying\.+$/, buf) | ||||
|       assert_match(/^Retrying hung up testcases\.+$/, buf) | ||||
|       assert_match(/^2 tests,.* 0 failures,/, buf) | ||||
|     end | ||||
|   end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nobuyoshi Nakada
						Nobuyoshi Nakada