Class: DeepTest::Main
- Inherits:
-
Object
- Object
- DeepTest::Main
- Defined in:
- lib/deep_test/main.rb
Instance Attribute Summary collapse
-
#central_command ⇒ Object
readonly
Returns the value of attribute central_command.
Instance Method Summary collapse
-
#initialize(options, deployment, runner, central_command = nil) ⇒ Main
constructor
A new instance of Main.
- #load_files(files) ⇒ Object
- #run(exit_when_done = true) ⇒ Object
- #shutdown ⇒ Object
Constructor Details
#initialize(options, deployment, runner, central_command = nil) ⇒ Main
Returns a new instance of Main.
5 6 7 8 9 10 |
# File 'lib/deep_test/main.rb', line 5 def initialize(, deployment, runner, central_command = nil) @options = @deployment = deployment @runner = runner @central_command = central_command || CentralCommand.start() end |
Instance Attribute Details
#central_command ⇒ Object (readonly)
Returns the value of attribute central_command.
3 4 5 |
# File 'lib/deep_test/main.rb', line 3 def central_command @central_command end |
Instance Method Details
#load_files(files) ⇒ Object
12 13 14 |
# File 'lib/deep_test/main.rb', line 12 def load_files(files) @deployment.load_files files end |
#run(exit_when_done = true) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/deep_test/main.rb', line 16 def run(exit_when_done = true) passed = false begin @options.new_listener_list.before_starting_agents @deployment.deploy_agents begin DeepTest.logger.debug { "Main: About to process work units (#{$$})" } passed = @runner.process_work_units(central_command) ensure shutdown end ensure DeepTest.logger.debug { "Main: Stopping CentralCommand" } @central_command.stop end Kernel.exit(passed ? 0 : 1) if exit_when_done end |