Skip to content

Commit a61495f

Browse files
committed
Build tests on run-only if marked as exceptions
1 parent ada8c86 commit a61495f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

sycl/test-e2e/format.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,14 @@ def execute(self, test, litConfig):
154154
if isinstance(script, lit.Test.Result):
155155
return script
156156

157+
158+
unsplit_test = False
159+
if "build-and-run-mode" in test.requires:
160+
unsplit_test = True
157161
devices_for_test = []
158162
triples = set()
159163
if test.config.test_mode == "build-only":
160-
if "build-and-run-mode" in test.requires or "true" in test.unsupported:
164+
if unsplit_test or "true" in test.unsupported:
161165
return lit.Test.Result(
162166
lit.Test.UNSUPPORTED, "Test unsupported for this environment"
163167
)
@@ -232,7 +236,7 @@ def get_extra_env(sycl_devices):
232236
continue
233237

234238
# Filter commands based on split-mode
235-
is_run_line = any(
239+
is_run_line = unsplit_test or any(
236240
i in directive.command
237241
for i in ["%{run}", "%{run-unfiltered-devices}", "%if run-mode"]
238242
)

sycl/test-e2e/lit.cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
elif config.test_mode == "run-only":
4646
lit_config.note("run-only test mode enabled, only executing tests")
4747
config.available_features.add("run-mode")
48+
config.available_features.add("build-and-run-mode")
4849
elif config.test_mode == "build-only":
4950
lit_config.note("build-only test mode enabled, only compiling tests")
5051
config.sycl_devices = []

0 commit comments

Comments
 (0)