Class: TestRunnerManager

Inherits:
Object show all
Defined in:
lib/ceedling/test_runner_manager.rb

Instance Method Summary collapse

Constructor Details

#initializeTestRunnerManager

Returns a new instance of TestRunnerManager.



12
13
14
15
16
# File 'lib/ceedling/test_runner_manager.rb', line 12

def initialize()
  @test_case_incl = nil
  @test_case_excl = nil
  @test_runner_defines = []
end

Instance Method Details

#collect_cmdline_argsObject

Return test case arguments (empty if not set)



38
39
40
# File 'lib/ceedling/test_runner_manager.rb', line 38

def collect_cmdline_args()
  return [ @test_case_incl, @test_case_excl ].compact()
end

#collect_definesObject

Return [‘UNITY_USE_COMMAND_LINE_ARGS’] #define required by Unity to enable cmd line arguments



43
44
45
# File 'lib/ceedling/test_runner_manager.rb', line 43

def collect_defines()
  return @test_runner_defines
end

#configure_build_options(config) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/ceedling/test_runner_manager.rb', line 18

def configure_build_options(config)
  cmdline_args = config[:test_runner][:cmdline_args]

  # Should never happen because of external config handling, but...
  return if cmdline_args.nil?

  @test_runner_defines << RUNNER_BUILD_CMDLINE_ARGS_DEFINE if cmdline_args
end

#configure_runtime_options(include_test_case, exclude_test_case) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/ceedling/test_runner_manager.rb', line 27

def configure_runtime_options(include_test_case, exclude_test_case)
  if !include_test_case.empty?
    @test_case_incl = "-f #{include_test_case}"
  end

  if !exclude_test_case.empty?
    @test_case_excl = "-x #{exclude_test_case}"
  end
end