Class: Zeus::ParallelTests::Worker
- Inherits:
-
Object
- Object
- Zeus::ParallelTests::Worker
- Defined in:
- lib/zeus/parallel_tests/worker.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(suite, env, argv) ⇒ Worker
constructor
A new instance of Worker.
- #spawn ⇒ Object
Constructor Details
#initialize(suite, env, argv) ⇒ Worker
Returns a new instance of Worker.
16 17 18 19 20 |
# File 'lib/zeus/parallel_tests/worker.rb', line 16 def initialize(suite, env, argv) @env = env @argv = argv @suite = suite end |
Class Method Details
.command(suite) ⇒ Object
12 13 14 |
# File 'lib/zeus/parallel_tests/worker.rb', line 12 def self.command(suite) "ruby #{__FILE__} #{suite}" end |
.run(argv, env) ⇒ Object
7 8 9 10 |
# File 'lib/zeus/parallel_tests/worker.rb', line 7 def self.run(argv, env) dumped_argv = argv.dup new(dumped_argv.shift, env, dumped_argv).spawn end |
Instance Method Details
#spawn ⇒ Object
22 23 24 25 26 |
# File 'lib/zeus/parallel_tests/worker.rb', line 22 def spawn system %(zeus parallel_#{@suite}_worker #{parallel_tests_attributes}) args_file.unlink $CHILD_STATUS.to_i end |