Skip to content
8 changes: 6 additions & 2 deletions sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,14 @@ def execute(self, test, litConfig):
if isinstance(script, lit.Test.Result):
return script

unsplit_test = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why, but something in me has a really huge dislike towards "unsplit" anywhere in regard to this feature...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to ignore_line_filtering, is that better?

if "build-and-run-mode" in test.requires:
unsplit_test = True

devices_for_test = []
triples = set()
if test.config.test_mode == "build-only":
if "build-and-run-mode" in test.requires or "true" in test.unsupported:
if unsplit_test or "true" in test.unsupported:
return lit.Test.Result(
lit.Test.UNSUPPORTED, "Test unsupported for this environment"
)
Expand Down Expand Up @@ -235,7 +239,7 @@ def get_extra_env(sycl_devices):
continue

# Filter commands based on split-mode
is_run_line = any(
is_run_line = (unsplit_test and test.config.fallback_build_run_only) or any(
i in directive.command
for i in ["%{run}", "%{run-unfiltered-devices}", "%if run-mode"]
)
Expand Down
4 changes: 4 additions & 0 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
elif config.test_mode == "run-only":
lit_config.note("run-only test mode enabled, only executing tests")
config.available_features.add("run-mode")
config.fallback_build_run_only = False
if lit_config.params.get("build-instead-of-skip-run-only", False):
config.available_features.add("build-and-run-mode")
config.fallback_build_run_only = True
elif config.test_mode == "build-only":
lit_config.note("build-only test mode enabled, only compiling tests")
config.sycl_devices = []
Expand Down
Loading