Skip to content

Commit 430f1de

Browse files
committed
Change pattern matching to if-else statements
1 parent 9b9e5de commit 430f1de

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,19 @@
3838
config.unsupported_features = []
3939

4040
# test-mode: Set if tests should run normally or only build/run
41-
match lit_config.params.get("test-mode", "full"):
42-
case "run-only":
43-
config.test_mode = "run-only"
44-
config.available_features.add("run-mode")
45-
case "build-only":
46-
config.test_mode = "build-only"
47-
config.sycl_devices = []
48-
arch_flag = ""
49-
case "full":
50-
config.test_mode = "full"
51-
config.available_features.add("run-mode")
52-
config.available_features.add("build-and-run-mode")
53-
case _:
54-
lit_config.error("Invalid argument for test-mode")
41+
config.test_mode = lit_config.params.get("test-mode", "full")
42+
if config.test_mode == "run-only":
43+
lit_config.note("run-only test mode enabled, only executing tests")
44+
config.available_features.add("run-mode")
45+
elif config.test_mode == "build-only":
46+
lit_config.note("build-only test mode enabled, only compiling tests")
47+
config.sycl_devices = []
48+
arch_flag = ""
49+
elif config.test_mode == "full":
50+
config.available_features.add("run-mode")
51+
config.available_features.add("build-and-run-mode")
52+
else:
53+
lit_config.error("Invalid argument for test-mode")
5554

5655
# Cleanup environment variables which may affect tests
5756
possibly_dangerous_env_vars = [

0 commit comments

Comments
 (0)