Skip to content

Commit 5089ec7

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 <[email protected]>
1 parent 7d1d2dc commit 5089ec7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

config/runtime/tests/ltp.jinja2

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
timeout:
44
minutes: {{ job_timeout|default(15) }}
55
definitions:
6-
- repository: https://github.com/kernelci/test-definitions
7-
from: git
8-
revision: kernelci.org
9-
path: automated/linux/ltp/ltp.yaml
10-
name: {{ node.name }}
11-
parameters:
12-
TST_CMDFILES: "{{ tst_cmdfiles|default('') }}"
13-
SKIP_INSTALL: "{{ skip_install }}"
14-
SKIPFILE: {{ skipfile }}
6+
{% if "coverage" in node.data.config_full %}
7+
{% include "util/gcov-reset.jinja2" %}
8+
{% endif %}
9+
- repository: https://github.com/kernelci/test-definitions
10+
from: git
11+
revision: kernelci.org
12+
path: automated/linux/ltp/ltp.yaml
13+
name: {{ node.name }}
14+
parameters:
15+
TST_CMDFILES: "{{ tst_cmdfiles|default('') }}"
16+
SKIP_INSTALL: "{{ skip_install }}"
17+
SKIPFILE: {{ skipfile }}
18+
{% if "coverage" in node.data.config_full %}
19+
{% include "util/gcov-upload.jinja2" %}
20+
{% endif %}

0 commit comments

Comments
 (0)