Skip to content

Commit

Permalink
🐛 Restored :unity & :test_runner defines merge
Browse files Browse the repository at this point in the history
The clearer and more explicit means for handling :test_runner configuration lost its original :defines merge
  • Loading branch information
mkarlesky committed May 19, 2024
1 parent 6615711 commit 7e923d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ceedling/configurator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def populate_defaults(config)


def populate_unity_defaults(config)
# Do nothing
unity = config[:unity] || {}

unity[:defines] = [] if (unity[:defines].nil?)
end


Expand Down Expand Up @@ -152,11 +154,14 @@ def configure_test_runner_generation(config)
config[:test_runner][:cmdline_args] = true
end

# Copy CMock options needed by test runner generation
# Copy CMock options used by test runner generation
config[:test_runner][:mock_prefix] = config[:cmock][:mock_prefix]
config[:test_runner][:mock_suffix] = config[:cmock][:mock_suffix]
config[:test_runner][:enforce_strict_ordering] = config[:cmock][:enforce_strict_ordering]

# Merge Unity options used by test runner generation
config[:test_runner][:defines] += config[:unity][:defines]

@runner_config = config[:test_runner]
end

Expand Down
1 change: 1 addition & 0 deletions lib/ceedling/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
:test_runner => {
:cmdline_args => false,
:includes => [],
:defines => [],
:file_suffix => '_runner',
},

Expand Down

0 comments on commit 7e923d4

Please sign in to comment.