chore(linux): Add --open option to open coverage reports in browser

This addresses code review comments.
This commit is contained in:
Eberhard Beilharz 2023-10-16 17:22:41 +02:00
parent 0ed8d35bb2
commit 943370d682
No known key found for this signature in database
GPG key ID: E9140597606020D3
2 changed files with 4 additions and 3 deletions

View file

@ -98,7 +98,7 @@ Run `./build.sh --debug --coverage --report test` to create the report.
There's also an index page (`linux/CodecoverageReports.html`) that links to all
three reports. You can run
`linux/build.sh --debug --coverage --report --no-integration test`
`linux/build.sh --debug --coverage --report --open --no-integration test`
to create the coverage reports for all three Linux projects and open the
index page in the browser.

View file

@ -24,15 +24,16 @@ builder_describe \
"install install artifacts" \
"uninstall uninstall artifacts" \
"--no-integration+ don't run integration tests" \
"--coverage+ capture test coverage" \
"--report+ create coverage report" \
"--coverage+ capture test coverage"
"--open open the coverage reports in the browser"
builder_parse "$@"
builder_run_child_actions clean configure build test install uninstall
test_action() {
if builder_has_option --report; then
if builder_has_option --open; then
builder_echo "Opening coverage reports in browser..."
xdg-open "file://${THIS_SCRIPT_PATH}/CodeCoverageReports.html"
fi