Skip to content

Commit 3f4dae0

Browse files
committed
chore(linux): make --report an option instead of action
This addresses code review comments.
1 parent a870b9a commit 3f4dae0

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

docs/settings/linux/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"command": "./build.sh",
173173
"args": [
174174
"test",
175-
"report",
175+
"--report",
176176
"--debug",
177177
"--coverage",
178178
"--no-integration"
@@ -181,7 +181,7 @@
181181
"cwd": "${workspaceFolder}/linux/ibus-keyman/",
182182
},
183183
"group": "build",
184-
"detail": "create unit test coverage"
184+
"detail": "run tests and create unit test coverage report"
185185
},
186186
{
187187
"type": "shell",

linux/ibus-keyman/build.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ builder_describe \
1919
"test" \
2020
"install install artifacts" \
2121
"uninstall uninstall artifacts" \
22-
"report create coverage report" \
2322
"@/core:arch" \
2423
"--no-integration don't run integration tests" \
24+
"--report create coverage report" \
2525
"--coverage capture test coverage"
2626

2727
builder_parse "$@"
@@ -76,6 +76,10 @@ if builder_start_action test; then
7676
else
7777
meson test --print-errorlogs $builder_verbose
7878
fi
79+
if builder_has_option --coverage; then
80+
# Note: requires lcov > 1.16 to properly work (see https://github.com/mesonbuild/meson/issues/6747)
81+
ninja coverage-html
82+
fi
7983
builder_finish_action success test
8084
fi
8185

@@ -90,10 +94,3 @@ if builder_start_action uninstall; then
9094
ninja uninstall
9195
builder_finish_action success uninstall
9296
fi
93-
94-
if builder_start_action report; then
95-
cd "$THIS_SCRIPT_PATH/$MESON_PATH"
96-
# Note: requires lcov > 1.16 to properly work (see https://github.com/mesonbuild/meson/issues/6747)
97-
ninja coverage-html
98-
builder_finish_action success report
99-
fi

0 commit comments

Comments
 (0)