Skip to content

Commit 694cc92

Browse files
[SYCL][E2E] Better control of testing preview-mode (#19727)
Before the PR we had two modes: * Default, auto-detect preview support in toolchain and have individual tests run dedicated `RUN`-lines * `--param test-preview-mode=<anything but False>`, run entire suite in preview mode using non-preview `RUN`-lines. Special `RUN`-lines dedicated to preview are ignored. This PR changes it to this: * Only allow `test-preview-mode` to be unset or set to True/False, fatal error on any other value. * If True/unset behave as in two previous scenarios * If False, only execute `RUN`-lines without preview markup I need this for compatibility testing because preview mode isn't backward ABI-compatible and I'm going to cherry-pick this to `sycl-rel-6_[23]` For trunk, I think we should just remove special `RUN`-lines and rely on "full preview" mode job in CI, but that will be a separate PR (because I wouldn't be able to backport such a big change).
1 parent 2443f54 commit 694cc92

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,13 @@ def open_check_file(file_name):
382382
else:
383383
config.substitutions.append(("%level_zero_options", ""))
384384

385-
if lit_config.params.get("test-preview-mode", "False") != "False":
385+
test_preview = lit_config.params.get("test-preview-mode")
386+
if test_preview is not None and test_preview not in ["True", "False"]:
387+
lit_config.fatal("test-preview-mode must be unset or set to True/False")
388+
389+
if test_preview == "True":
386390
config.available_features.add("preview-mode")
387-
else:
391+
elif test_preview is None:
388392
# Check for sycl-preview library
389393
check_preview_breaking_changes_file = "preview_breaking_changes_link.cpp"
390394
with open_check_file(check_preview_breaking_changes_file) as fp:

0 commit comments

Comments
 (0)