Skip to content

Commit de43757

Browse files
authored
[SYCL][Test] Make testsuite respect SYCL_LIB_DUMPS_ONLY (#14879)
Running the check-sycl-dumps target sets the SYCL_LIB_DUMPS_ONLY param for lit which should only enable the ABI dump tests. However, since 1fde656 we've added a non `lit.formats.ShTest()` which doesn't respect config.suffixes, so we need to account for this.
1 parent 27cea9f commit de43757

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sycl/test/format.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import os
66
import re
77

8+
SUFFIXES = {".hpp"}
9+
810

911
class SYCLHeadersTest(lit.formats.TestFormat):
1012
def getTestsForPath(
@@ -21,7 +23,8 @@ def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig):
2123
for dirpath, _, filenames in os.walk(source_path):
2224
relative_dirpath = dirpath[len(localConfig.sycl_include) + 1 :]
2325
for filename in filenames:
24-
if not filename.endswith(".hpp"):
26+
suffix = os.path.splitext(filename)[1]
27+
if suffix not in SUFFIXES or suffix not in litConfig.suffixes:
2528
continue
2629
filepath = os.path.join(dirpath, filename)
2730

0 commit comments

Comments
 (0)