Skip to content

Commit 24cd62f

Browse files
committed
Filter test categories
1 parent eeef05c commit 24cd62f

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

Diff for: .github/workflows/sycl-linux-run-tests.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ on:
156156
LIT_OPTS won't work as we redefine it as part of this workflow.
157157
158158
For SYCL CTS - CTS_TESTS_TO_BUILD to specify which categories to
159-
build.
159+
build, e.g. {"CTS_TESTS_TO_BUILD":"test_category1 test_category2..."}.
160160
161161
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
162162
default: '{}'
@@ -413,6 +413,25 @@ jobs:
413413
run: |
414414
./build-cts/bin/* --list-devices
415415
416+
# If the suite was built on another machine then it also contains excluded
417+
# categories. Check the filter file and remove them.
418+
- name: Filter SYCL CTS test categories
419+
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.sycl_cts_artifact != ''
420+
shell: bash
421+
run: |
422+
cts_exclude_filter=""
423+
if [ "${{ contains(inputs.target_devices, 'opencl:cpu') }}" = "true" ]; then
424+
cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
425+
elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu') }}" = "true" ]; then
426+
cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
427+
fi
428+
429+
while IFS= read -r line; do
430+
if [[ $line != \#* ]]; then
431+
rm "./build-cts/bin/test_$line"
432+
fi
433+
done < "$cts_exclude_filter"
434+
416435
- name: Run SYCL CTS tests
417436
# Proceed with execution even if the previous two steps did not succeed.
418437
if: inputs.tests_selector == 'cts' && (success() || failure()) && inputs.cts_build_only != 'true'

Diff for: devops/cts_exclude_filter_L0_GPU

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# Please use "#" to add comments here.
2+
# Do not delete the file even if it's empty.
13
# CMPLRTST-26179
24
device

Diff for: devops/cts_exclude_filter_OCL_CPU

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Please use "#" to add comments here.
2+
# Do not delete the file even if it's empty.

0 commit comments

Comments
 (0)