node/reduction.rb
# generate the next testcase to try
generate the next testcase to try
generate the next testcase to try
def testcase_generate
		html = ''
		thread = ::Thread.new do
			finished_pass = false
			case @current_pass
				when 1
					finished_pass = @genopts.finished?
					@genopts.skip().call if not finished_pass
				when 2
					finished_pass = @elems.finished?
					@elems.skip if not finished_pass
				when 3
					finished_pass = @idxs.finished?
					@idxs.skip if not finished_pass
				when 4
				else
					finished_pass = true
			end
			if( finished_pass )
				@reduction_server.stop
				::Thread.current.kill
			end
			html = @xmlcrashlog.generate_html( @opts, @elems ? @elems.skipping : [], @idxs ? @idxs.skipping : [] )
		end
		thread.join
		return html
	end
def testcase_generate html = '' thread = :: Thread . new do finished_pass = false case @current_pass when 1 finished_pass = @genopts . finished? @genopts . skip ( ) . call if not finished_pass when 2 finished_pass = @elems . finished? @elems . skip if not finished_pass when 3 finished_pass = @idxs . finished? @idxs . skip if not finished_pass when 4 else finished_pass = true end if ( finished_pass ) @reduction_server . stop :: Thread . current . kill end html = @xmlcrashlog . generate_html ( @opts , @elems ? @elems . skipping : [ ] , @idxs ? @idxs . skipping : [ ] ) end thread . join return html end
generate the next testcase to try
generate the next testcase to try
# Initial verification # Reducing elements # Reducing idx's # Final verification # do nothing, we just want to verify the final testcase will still generate a crash # generate the html testcase from the log file # and serve it back out to the browser via the server