Skip to content

Commit 24a6e15

Browse files
committed
config: runtime: tests: ltp: enable support for code coverage
When enabling code coverage support using in-kernel GCOV, we must first reset coverage "recording" right before starting the test, then ensure we pack and upload the resulting artifacts. Those steps are executed by including the corresponding sub-templates whenever the kernel has been built with GCOV support, IOW when the `coverage` fragment is part of the build config. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
1 parent ca5e663 commit 24a6e15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/runtime/tests/ltp.jinja2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
timeout:
44
minutes: {{ job_timeout|default(15) }}
55
definitions:
6+
{% if "coverage" in node.data.config_full %}
7+
{% include "util/gcov-reset.jinja2" %}
8+
{% endif %}
69
- repository: https://github.com/kernelci/test-definitions
710
from: git
811
revision: kernelci.org
@@ -12,3 +15,6 @@
1215
TST_CMDFILES: "{{ tst_cmdfiles|default('') }}"
1316
SKIP_INSTALL: "{{ skip_install }}"
1417
SKIPFILE: {{ skipfile }}
18+
{% if "coverage" in node.data.config_full %}
19+
{% include "util/gcov-upload.jinja2" %}
20+
{% endif %}

0 commit comments

Comments
 (0)