Skip to content

Commit 5fc343a

Browse files
committed
ci: surface coverage counts GPU-run examples (test_examples.py executes them)
1 parent e7b79ef commit 5fc343a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/scripts/surface_coverage.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
ROOT = pathlib.Path(__file__).resolve().parents[2]
1717
HEADERS = [*ROOT.glob("glass*.cuh"), *(ROOT / "src").rglob("*.cuh")]
18-
TESTS = list((ROOT / "test" / "cuda").glob("*.cu"))
18+
TESTS = [*(ROOT / "test" / "cuda").glob("*.cu"),
19+
*(ROOT / "examples").glob("*.cu")] # examples run on GPU via test_examples.py
1920

2021
# A public entry point = a `/** ... */` doc comment whose following declaration
2122
# names a function. Captures free functions and namespaced ones alike.
@@ -43,7 +44,7 @@ def main():
4344
gaps = sorted(set(surface) - covered)
4445
pct = 100.0 * len(covered) / max(1, len(surface))
4546
print(f"surface: {len(surface)} public entry points, "
46-
f"{len(covered)} exercised by test/cuda -> {pct:.1f}%")
47+
f"{len(covered)} exercised by test/cuda + examples -> {pct:.1f}%")
4748
if args.list_gaps and gaps:
4849
print("uncovered:")
4950
for n in gaps:

0 commit comments

Comments
 (0)