method
run

v1_9_3_392 -
Show latest stable
-
0 notes -
Class: Worker
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
run(args = [])
public
Hide source
# File lib/test/unit/parallel.rb, line 83 def run(args = []) process_args args @@stop_auto_run = true @opts = @options.dup @need_exit = false @old_loadpath = [] begin @stdout = increment_io(STDOUT) @stdin = increment_io(STDIN) @stdout.sync = true @stdout.puts "ready" while buf = @stdin.gets case buf.chomp when /^loadpath (.+?)$/ @old_loadpath = $:.dup $:.push(*Marshal.load($1.unpack("m")[0].force_encoding("ASCII-8BIT"))).uniq! when /^run (.+?) (.+?)$/ @stdout.puts "okay" @options = @opts.dup suites = MiniTest::Unit::TestCase.test_suites begin require $1 rescue LoadError @stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m").gsub("\n","")}" @stdout.puts "ready" next end _run_suites MiniTest::Unit::TestCase.test_suites-suites, $2.to_sym if @need_exit begin @stdout.puts "bye" rescue Errno::EPIPE; end exit else @stdout.puts "ready" end when /^quit$/ begin @stdout.puts "bye" rescue Errno::EPIPE; end exit end end rescue Errno::EPIPE rescue Exception => e begin @stdout.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}" rescue Errno::EPIPE;end exit ensure @stdin.close @stdout.close end end