Skip to content

Commit ca784f5

Browse files
[SYCL] Augment sycl-ls.test to increase code coverage. (#13165)
1 parent bb48303 commit ca784f5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sycl/test/tools/sycl-ls.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
RUN: sycl-ls --verbose > vanilla_verbose.out
44
RUN: sycl-ls > vanilla.out
55

6+
RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" sycl-ls > ods_opencl.out
7+
RUN: env SYCL_DEVICE_ALLOWLIST="BackendName:opencl" sycl-ls > sda_opencl.out
8+
RUN: diff ods_opencl.out sda_opencl.out
9+
610
-- Check the functioning of '--ignore-device-selectors' CLI option.
711

812
RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" sycl-ls --ignore-device-selectors > ods_ignore_device_selector.out
@@ -16,3 +20,8 @@ RUN: diff vanilla.out sda_ignore_device_selector.out
1620

1721
RUN: env SYCL_DEVICE_ALLOWLIST="BackendName:opencl" sycl-ls --ignore-device-selectors --verbose > sda_ignore_device_selector_v.out
1822
RUN: diff vanilla_verbose.out sda_ignore_device_selector_v.out
23+
24+
-- Check illegal CLI option with sycl-ls.
25+
26+
RUN: not sycl-ls --some-random-option &> error_msg.txt ; FileCheck --input-file error_msg.txt --check-prefix CHECK_ERROR_MSG %s
27+
CHECK_ERROR_MSG: Usage: sycl-ls [--verbose] [--ignore-device-selectors]

0 commit comments

Comments
 (0)