Skip to content

[SYCL][E2E] Change pattern matching to if-else statements in lit.cfg.py #16217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,18 @@
config.unsupported_features = []

# test-mode: Set if tests should run normally or only build/run
match lit_config.params.get("test-mode", "full"):
case "run-only":
config.test_mode = "run-only"
config.available_features.add("run-mode")
case "build-only":
config.test_mode = "build-only"
config.sycl_devices = []
case "full":
config.test_mode = "full"
config.available_features.add("run-mode")
config.available_features.add("build-and-run-mode")
case _:
lit_config.error("Invalid argument for test-mode")
config.test_mode = lit_config.params.get("test-mode", "full")
if config.test_mode == "full":
config.available_features.add("run-mode")
config.available_features.add("build-and-run-mode")
elif config.test_mode == "run-only":
lit_config.note("run-only test mode enabled, only executing tests")
config.available_features.add("run-mode")
elif config.test_mode == "build-only":
lit_config.note("build-only test mode enabled, only compiling tests")
config.sycl_devices = []
else:
lit_config.error("Invalid argument for test-mode")

# Cleanup environment variables which may affect tests
possibly_dangerous_env_vars = [
Expand Down
Loading