Class: Mxrb::Functional::Instrumenter
- Inherits:
-
Object
- Object
- Mxrb::Functional::Instrumenter
- Defined in:
- lib/mxrb/functional.rb
Overview
Adds an isolated after-startup runner to a writable disposable MPR copy.
Constant Summary collapse
- MODULE_NAME =
"MxrbTests"- RUNNER_NAME =
"RunAll"- LOG_NODE =
"'MXRB_TEST'".freeze
Instance Method Summary collapse
-
#initialize(path, definition) ⇒ Instrumenter
constructor
A new instance of Instrumenter.
- #instrument! ⇒ Object
- #runner ⇒ Object
Constructor Details
#initialize(path, definition) ⇒ Instrumenter
Returns a new instance of Instrumenter.
117 118 119 120 |
# File 'lib/mxrb/functional.rb', line 117 def initialize(path, definition) @path = File.(path) @definition = definition end |
Instance Method Details
#instrument! ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/mxrb/functional.rb', line 122 def instrument! raise FunctionalTestError, "functional test suite is empty" if @definition.empty? version = validate_targets! mod = build_module Writer.new( @path, version: version, modules: [mod.to_h], security: nil, native_units_path: nil ).write! select_after_startup! self end |
#runner ⇒ Object
136 |
# File 'lib/mxrb/functional.rb', line 136 def runner = "#{MODULE_NAME}.#{RUNNER_NAME}" |