Method: OpenC3::Group#run

Defined in:
lib/openc3/script/suite.rb

#runObject

Run all the scripts



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/openc3/script/suite.rb', line 309

def run
  results = []

  # Setup the script group
  result = run_setup()
  if result
    results << result
    yield result if block_given?
    raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped
  end

  # Run all the scripts
  self.class.scripts.each do |method_name|
    results << run_script(method_name)
    yield results[-1] if block_given?
    raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped
  end

  # Teardown the script group
  result = run_teardown()
  if result
    results << result
    yield result if block_given?
    raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped
  end

  results
end