Class: Runner::TestRun

Inherits:
Object
  • Object
show all
Defined in:
lib/logpoop/runner/test_run.rb

Instance Method Summary collapse

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/logpoop/runner/test_run.rb', line 3

def run
  stdout, logout = Context.ttys[0..1]
  log = Context.logs[0]
  threads=[]
  threads << Thread.new(stdout) do |myout|
    sim = Simulator::TestRun.new(myout)
    Context.simulators << sim
    sim.fake_it
  end
  if(logout)
    threads << Thread.new(logout, log) do |myout, mylog|
      sim = Simulator::TailEff.new(myout, mylog)
      Context.simulators << sim
      sim.fake_it
    end
  end
  threads.map(&:join)
end