Skip to content

Commit 1eb4594

Browse files
authored
Exclude headers with SYCL kernels from the coverage report (#2623)
The PR excludes the headers files under `backend/kernels/elementwise_functions` from the coverage report, because there is no way to cover structures used inside the SYCL kernels.
1 parent 37db1c5 commit 1eb4594

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.github/workflows/generate_coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
conda activate coverage
136136
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
137137
git clean -fxd
138-
python scripts/gen_coverage.py --verbose
138+
python scripts/gen_coverage.py
139139
140140
- name: Total number of coverage attempts
141141
run: |

scripts/gen_coverage.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def run(
100100
"term-missing",
101101
"--pyargs",
102102
"dpnp",
103-
"-vv",
104103
*pytest_opts.split(),
105104
],
106105
cwd=setup_dir,
@@ -109,8 +108,6 @@ def run(
109108
)
110109

111110
def find_objects():
112-
import os
113-
114111
objects = []
115112
dpnp_path = os.getcwd()
116113
search_path = os.path.join(dpnp_path, "dpnp")
@@ -146,6 +143,7 @@ def find_objects():
146143
"export",
147144
"-format=lcov",
148145
"-ignore-filename-regex=/tmp/icpx*",
146+
r"-ignore-filename-regex=.*/backend/kernels/elementwise_functions/.*\.hpp$",
149147
"-instr-profile=" + instr_profile_fn,
150148
]
151149
+ objects

0 commit comments

Comments
 (0)