Skip to content

Commit 7c872a4

Browse files
committed
Improve coverage report
1 parent 38b0c4f commit 7c872a4

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

scripts/gen_coverage.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,33 @@ def run(
7676
env=env,
7777
)
7878

79+
# def find_objects():
80+
# import os
81+
82+
# objects = []
83+
# dpnp_path = os.getcwd()
84+
# search_path = os.path.join(dpnp_path, "dpnp")
85+
# files = os.listdir(search_path)
86+
# for file in files:
87+
# if file.endswith("_c.so"):
88+
# objects.extend(["-object", os.path.join(search_path, file)])
89+
# return objects
90+
7991
def find_objects():
8092
import os
8193

8294
objects = []
8395
dpnp_path = os.getcwd()
8496
search_path = os.path.join(dpnp_path, "dpnp")
85-
files = os.listdir(search_path)
86-
for file in files:
87-
if file.endswith("_c.so"):
88-
objects.extend(["-object", os.path.join(search_path, file)])
97+
for root, _, files in os.walk(search_path):
98+
for file in files:
99+
if file.endswith("_c.so") or root.find("extensions") != -1 and file.find("_impl.cpython") != -1:
100+
objects.extend(["-object", os.path.join(root, file)])
89101
return objects
90102

91103
objects = find_objects()
104+
print("\nobjects:\n", objects)
105+
92106
instr_profile_fn = "dpnp_pytest.profdata"
93107
# generate instrumentation profile data
94108
subprocess.check_call(

0 commit comments

Comments
 (0)