Skip to content

Commit fbbbd8e

Browse files
committed
Remove unsplit name
1 parent 09db374 commit fbbbd8e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

sycl/test-e2e/format.py

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

157-
unsplit_test = False
158-
if "build-and-run-mode" in test.requires:
159-
unsplit_test = True
160-
161157
devices_for_test = []
162158
triples = set()
159+
ignore_line_filtering = False
163160
if test.config.test_mode == "build-only":
164-
if unsplit_test or "true" in test.unsupported:
161+
if "build-and-run-mode" in test.requires or "true" in test.unsupported:
165162
return lit.Test.Result(
166163
lit.Test.UNSUPPORTED, "Test unsupported for this environment"
167164
)
@@ -177,6 +174,10 @@ def execute(self, test, litConfig):
177174
(backend, _) = sycl_device.split(":")
178175
triples.add(get_triple(test, backend))
179176

177+
if "build-and-run-mode" in test.requires and test.config.fallback_build_run_only:
178+
ignore_line_filtering = True
179+
180+
180181
substitutions = lit.TestRunner.getDefaultSubstitutions(test, tmpDir, tmpBase)
181182
substitutions.append(("%{sycl_triple}", format(",".join(triples))))
182183
# -fsycl-targets is needed for CUDA/HIP, so just use it be default so
@@ -239,7 +240,7 @@ def get_extra_env(sycl_devices):
239240
continue
240241

241242
# Filter commands based on split-mode
242-
is_run_line = (unsplit_test and test.config.fallback_build_run_only) or any(
243+
is_run_line = ignore_line_filtering or any(
243244
i in directive.command
244245
for i in ["%{run}", "%{run-unfiltered-devices}", "%if run-mode"]
245246
)

sycl/test-e2e/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939

4040
# test-mode: Set if tests should run normally or only build/run
4141
config.test_mode = lit_config.params.get("test-mode", "full")
42+
config.fallback_build_run_only = False
4243
if config.test_mode == "full":
4344
config.available_features.add("run-mode")
4445
config.available_features.add("build-and-run-mode")
4546
elif config.test_mode == "run-only":
4647
lit_config.note("run-only test mode enabled, only executing tests")
4748
config.available_features.add("run-mode")
48-
config.fallback_build_run_only = False
4949
if lit_config.params.get("build-instead-of-skip-run-only", False):
5050
config.available_features.add("build-and-run-mode")
5151
config.fallback_build_run_only = True

0 commit comments

Comments
 (0)