Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the combination of use_test_preprocessor and CMock's treat_inlines #728

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ceedling/file_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def find_header_input_for_mock_file(mock_file)
mock_input = @cacheinator.diff_cached_test_file( @file_path_utils.form_preprocessed_file_filepath( found_path ) )
end

return mock_input
return mock_input, found_path
end


Expand Down
6 changes: 3 additions & 3 deletions lib/ceedling/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ def generate_dependencies_file(tool, context, source, object, dependencies)
end

def generate_mock(context, mock)
arg_hash = {:header_file => mock.source, :context => context}
arg_hash = {:header_file => mock[0].source, :context => context}
@plugin_manager.pre_mock_generate( arg_hash )

begin
folder = @file_path_utils.form_folder_for_mock(mock.name)
folder = @file_path_utils.form_folder_for_mock(mock[0].name)
if folder == ''
folder = nil
end
@cmock_builder.cmock.setup_mocks( arg_hash[:header_file], folder )
@cmock_builder.cmock.setup_mocks( arg_hash[:header_file], mock[0].sources[1], folder )
rescue
raise
ensure
Expand Down
4 changes: 2 additions & 2 deletions lib/ceedling/rules_cmock.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rule(/#{CMOCK_MOCK_PREFIX}[^\/\\]+#{'\\'+EXTENSION_SOURCE}$/ => [
proc do |task_name|
@ceedling[:file_finder].find_header_input_for_mock_file(task_name)
end
]) do |mock|
]) do |mock,orig|

@ceedling[:generator].generate_mock(TEST_SYM, mock)
@ceedling[:generator].generate_mock(TEST_SYM, [mock,orig])
end
2 changes: 1 addition & 1 deletion vendor/cmock