Skip to content

Commit

Permalink
Be a bit more flexible with which gcovr version we're testing.
Browse files Browse the repository at this point in the history
Be stricter about when to use the newer version (as it will fall back to the older version in some cases)
  • Loading branch information
mvandervoord committed Jun 18, 2021
1 parent a1fddcf commit c77828b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/gcov/lib/gcovr_reportinator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def make_reports(opts)
# Build the common gcovr arguments.
args_common = args_builder_common(opts)

if (gcovr_version_info[0] >= 4) && (gcovr_version_info[1] >= 2)
if ((gcovr_version_info[0] == 4) && (gcovr_version_info[1] >= 2)) || (gcovr_version_info[0] > 4)
# gcovr version 4.2 and later supports generating multiple reports with a single call.
args = args_common
args += args_builder_cobertura(opts, false)
Expand Down
2 changes: 1 addition & 1 deletion spec/gcov/gcov_deployment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

@output = `bundle exec ruby -S ceedling utils:gcov`
expect(@output).to match(/For now, creating only an HtmlBasic report\./)
expect(@output).to match(/Creating gcov results report\(s\) in 'build\/artifacts\/gcov'\.\.\. Done/)
expect(@output).to match(/Creating (?:a )?gcov (?:results)?(?:HTML)? report(?:\(s\))? in 'build\/artifacts\/gcov'\.\.\. Done/)
expect(File.exists?('build/artifacts/gcov/GcovCoverageResults.html')).to eq true

end
Expand Down

0 comments on commit c77828b

Please sign in to comment.