Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Alberto Mardegan
Lomiri VNC
Commits
2d246e07
Commit
2d246e07
authored
Dec 12, 2020
by
Alberto Mardegan
Browse files
build: add branch coverage information
parent
8113d8bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
qbs/imports/CoverageReport.qbs
qbs/imports/CoverageReport.qbs
+9
-3
No files found.
qbs/imports/CoverageReport.qbs
View file @
2d246e07
...
...
@@ -18,6 +18,10 @@ Product {
outputFileTags: "coverage.html"
requiresInputs: false
prepare: {
var lcovCommonOptions = [
"--rc", "lcov_branch_coverage=1",
];
var commands = []
var captureCmd = new Command("lcov", [
"--directory", project.sourceDirectory,
...
...
@@ -25,7 +29,7 @@ Product {
"--output-file", "coverage.info",
"--no-checksum",
"--compat-libtool",
]);
]
.concat(lcovCommonOptions)
);
captureCmd.description = "Collecting coverage data";
captureCmd.highlight = "coverage";
captureCmd.silent = false;
...
...
@@ -40,7 +44,8 @@ Product {
if (product.extractPatterns.length > 0) {
extractArgs.push("-o");
extractArgs.push("coverage.info");
var extractCmd = new Command("lcov", extractArgs);
var params = extractArgs.concat(lcovCommonOptions);
var extractCmd = new Command("lcov", params);
extractCmd.description = "Extracting coverage data";
extractCmd.highlight = "coverage";
extractCmd.silent = false;
...
...
@@ -52,7 +57,7 @@ Product {
"--remove", "coverage.info", 'qrc_*.cpp',
"--remove", "coverage.info", '*/tests/*',
"-o", "coverage.info",
]);
]
.concat(lcovCommonOptions)
);
filterCmd.description = "Filtering coverage data";
filterCmd.highlight = "coverage";
filterCmd.silent = false;
...
...
@@ -60,6 +65,7 @@ Product {
var genhtmlCmd = new Command("genhtml", [
"--prefix", project.sourceDirectory,
"--rc", "genhtml_branch_coverage=1",
"--output-directory", product.outputDirectory,
"--title", "Code coverage",
"--legend",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment