Skip to content

Commit 9da7816

Browse files
committed
config: runtime: tests: kselftest*: enable coverage support
When the kernel is built with GCOV support, we want to pack and upload coverage data as a job artifact. Add the following bits to the job templates to make that happen. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
1 parent 8d15162 commit 9da7816

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

config/runtime/tests/kselftest-platform-parameters.jinja2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
- tar xf main.tar.gz -C /opt/
2727
name: platform-test-parameters-fetch
2828
path: inline/platform-test-parameters-fetch.yaml
29-
29+
{% if "coverage" in node.data.config_full %}
30+
{% include "util/gcov-reset.jinja2" %}
31+
{% endif %}
3032
- repository: https://github.com/kernelci/test-definitions.git
3133
from: git
3234
revision: kernelci.org
@@ -39,3 +41,6 @@
3941
TST_CASENAME: '{{ tests }}'
4042
SKIP_INSTALL: True
4143
ENV: '{{ env }}'
44+
{% if "coverage" in node.data.config_full %}
45+
{% include "util/gcov-upload.jinja2" %}
46+
{% endif %}

config/runtime/tests/kselftest.jinja2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
- systemctl stop systemd-timesyncd || true
1414
name: timesync-off
1515
path: inline/timesync-off.yaml
16-
16+
{% if "coverage" in node.data.config_full %}
17+
{% include "util/gcov-reset.jinja2" %}
18+
{% endif %}
1719
- repository: https://github.com/kernelci/test-definitions.git
1820
from: git
1921
revision: kernelci.org
@@ -26,3 +28,6 @@
2628
TST_CASENAME: '{{ tests }}'
2729
SKIP_INSTALL: True
2830
ENV: '{{ env }}'
31+
{% if "coverage" in node.data.config_full %}
32+
{% include "util/gcov-upload.jinja2" %}
33+
{% endif %}

0 commit comments

Comments
 (0)