Skip to content

Commit

Permalink
🐛 New test preprocessor handling fix
Browse files Browse the repository at this point in the history
Was not handling :all properly
  • Loading branch information
mkarlesky committed Jul 25, 2024
1 parent dd3fee1 commit 72a49f4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/ceedling/configurator_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,37 @@ def set_build_thread_counts(in_hash)
end


def set_test_preprocessor_accessors(in_hash)
accessors = {}

# :project_use_test_preprocessor already validated
case in_hash[:project_use_test_preprocessor]
when :none
accessors = {
:project_use_test_preprocessor_tests => false,
:project_use_test_preprocessor_mocks => false
}
when :all
accessors = {
:project_use_test_preprocessor_tests => true,
:project_use_test_preprocessor_mocks => true
}
when :tests
accessors = {
:project_use_test_preprocessor_tests => true,
:project_use_test_preprocessor_mocks => false
}
when :mocks
accessors = {
:project_use_test_preprocessor_tests => false,
:project_use_test_preprocessor_mocks => true
}
end

return accessors
end


def expand_all_path_globs(in_hash)
out_hash = {}
path_keys = []
Expand Down
1 change: 1 addition & 0 deletions lib/ceedling/configurator_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def build_project_config(ceedling_lib_path, flattened_config)
flattened_config.merge!( @configurator_builder.set_rakefile_components( ceedling_lib_path, flattened_config ) )
flattened_config.merge!( @configurator_builder.set_release_target( flattened_config ) )
flattened_config.merge!( @configurator_builder.set_build_thread_counts( flattened_config ) )
flattened_config.merge!( @configurator_builder.set_test_preprocessor_accessors( flattened_config ) )

return flattened_config
end
Expand Down

0 comments on commit 72a49f4

Please sign in to comment.