Skip to content

Commit 1d5a436

Browse files
committed
Make testsuite respect SYCL_LIB_DUMPS_ONLY
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 0228c23 commit 1d5a436

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

sycl/test/lit.cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
config.test_format = lit.formats.ShTest()
2424

2525
# suffixes: A list of file extensions to treat as test files.
26-
dump_only_tests = bool(lit_config.params.get("SYCL_LIB_DUMPS_ONLY", False))
27-
if dump_only_tests:
26+
config.dump_only_tests = bool(lit_config.params.get("SYCL_LIB_DUMPS_ONLY", False))
27+
if config.dump_only_tests:
2828
config.suffixes = [".dump"] # Only run dump testing
2929
else:
3030
config.suffixes = [
@@ -186,7 +186,7 @@
186186
)
187187

188188
# Dump-only tests do not have clang available
189-
if not dump_only_tests:
189+
if not config.dump_only_tests:
190190
llvm_config.use_clang(additional_flags=additional_flags)
191191

192192
# Set timeout for test = 10 mins
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import os
2-
from format import SYCLHeadersTest
1+
if not config.dump_only_tests:
2+
import os
3+
from format import SYCLHeadersTest
4+
config.test_format = SYCLHeadersTest()
35

4-
config.test_format = SYCLHeadersTest()
5-
6-
# List of files that are not expected to compile cleanly when used
7-
# standalone. `os.path.join` is required here so the filtering works
8-
# cross-platform
9-
config.sycl_headers_xfail = [
10-
os.path.join(
11-
"sycl", "ext", "oneapi", "experimental", "backend", "cuda.hpp"
12-
),
13-
os.path.join(
14-
"sycl", "ext", "intel", "esimd", "detail", "types_elementary.hpp"
15-
),
16-
]
6+
# List of files that are not expected to compile cleanly when used
7+
# standalone. `os.path.join` is required here so the filtering works
8+
# cross-platform
9+
config.sycl_headers_xfail = [
10+
os.path.join(
11+
"sycl", "ext", "oneapi", "experimental", "backend", "cuda.hpp"
12+
),
13+
os.path.join(
14+
"sycl", "ext", "intel", "esimd", "detail", "types_elementary.hpp"
15+
),
16+
]

0 commit comments

Comments
 (0)