-
-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
We are using the config_file option of the gcovr plugin.
This means, that we only set in our project.yml:
:gcov:
:utilities:
- gcovr
:gcovr:
:report_root: "../../"
:config_file: ../../foo.cfg"The problem is now, that Ceedling still provides default values if these are not specified, e.g., for --exclude on the command line and these have precedence over the configuration file:
Ceedling/plugins/gcov/lib/gcovr_reportinator.rb
Lines 129 to 148 in c50ff9d
| args += "--root \"#{gcovr_opts[:report_root]}\" " unless gcovr_opts[:report_root].nil? | |
| args += "--config \"#{gcovr_opts[:config_file]}\" " unless gcovr_opts[:config_file].nil? | |
| args += "--filter \"#{gcovr_opts[:report_include]}\" " unless gcovr_opts[:report_include].nil? | |
| args += "--exclude \"#{gcovr_opts[:report_exclude]}\" " unless gcovr_opts[:report_exclude].nil? | |
| args += "--gcov-filter \"#{gcovr_opts[:gcov_filter]}\" " unless gcovr_opts[:gcov_filter].nil? | |
| args += "--gcov-exclude \"#{gcovr_opts[:gcov_exclude]}\" " unless gcovr_opts[:gcov_exclude].nil? | |
| args += "--exclude-directories \"#{gcovr_opts[:exclude_directories]}\" " unless gcovr_opts[:exclude_directories].nil? | |
| args += "--branches " if gcovr_opts[:branches] | |
| args += "--sort-uncovered " if gcovr_opts[:sort_uncovered] | |
| args += "--sort-percentage " if gcovr_opts[:sort_percentage] | |
| args += "--print-summary " if gcovr_opts[:print_summary] | |
| args += "--gcov-executable \"#{gcovr_opts[:gcov_executable]}\" " unless gcovr_opts[:gcov_executable].nil? | |
| args += "--exclude-unreachable-branches " if gcovr_opts[:exclude_unreachable_branches] | |
| args += "--exclude-throw-branches " if gcovr_opts[:exclude_throw_branches] | |
| args += "--use-gcov-files " if gcovr_opts[:use_gcov_files] | |
| args += "--gcov-ignore-parse-errors " if gcovr_opts[:gcov_ignore_parse_errors] | |
| args += "--keep " if gcovr_opts[:keep] | |
| args += "--delete " if gcovr_opts[:delete] | |
| args += "-j #{gcovr_opts[:threads]} " if !(gcovr_opts[:threads].nil?) && (gcovr_opts[:threads].is_a? Integer) | |
This is of course undesired behavior when a configuration file is used.
So, when :config_file: is provided, all other options shall not be set to default.
Important: As Ceedling is the setting the cwd implicitly through where it is invoked, :report_root: must still be parsed nevertheless!
Metadata
Metadata
Assignees
Labels
No labels