From 38e6e1bf599c49d0ec4d827a90506ff8ba071c2f Mon Sep 17 00:00:00 2001
From: Nikita Kornev <nikita.kornev@intel.com>
Date: Mon, 20 Jan 2025 16:49:06 +0100
Subject: [PATCH] [CI][CTS] Add filter for build-only mode (#16671)

In nightly we build and run CTS separately, so the build contains the
full set of tests. Adding a filter to exclude categories that are not
supported at all (e.g. compfail).
---
 .github/workflows/sycl-linux-run-tests.yml | 4 +++-
 devops/cts_exclude_filter_compfails        | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 devops/cts_exclude_filter_compfails

diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml
index 3e4066fdc1904..269507943c573 100644
--- a/.github/workflows/sycl-linux-run-tests.yml
+++ b/.github/workflows/sycl-linux-run-tests.yml
@@ -361,7 +361,9 @@ jobs:
         cts_exclude_filter=""
         # If CTS_TESTS_TO_BUILD is null - use filter
         if [ -z "$CTS_TESTS_TO_BUILD" ]; then
-          if [ "${{ contains(inputs.target_devices, 'opencl:cpu')  }}" = "true" ]; then
+          if [ "${{ contains(inputs.cts_testing_mode, 'build-only')  }}" = "true" ]; then
+            cts_exclude_filter=$PWD/devops/cts_exclude_filter_compfails
+          elif [ "${{ contains(inputs.target_devices, 'opencl:cpu')  }}" = "true" ]; then
             cts_exclude_filter=$PWD/devops/cts_exclude_filter_OCL_CPU
           elif [ "${{ contains(inputs.target_devices, 'level_zero:gpu')  }}" = "true" ]; then
             cts_exclude_filter=$PWD/devops/cts_exclude_filter_L0_GPU
diff --git a/devops/cts_exclude_filter_compfails b/devops/cts_exclude_filter_compfails
new file mode 100644
index 0000000000000..44d3870b88048
--- /dev/null
+++ b/devops/cts_exclude_filter_compfails
@@ -0,0 +1,2 @@
+# Please use "#" to add comments here.
+# Do not delete the file even if it's empty.