From e9ee0fcda31233d0b84031533829262890bed979 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 23 Oct 2024 08:37:12 -0700 Subject: [PATCH 1/2] [SYCL] Move SYCL header E2E test to compile-time Signed-off-by: Sarnie, Nick --- sycl/{test-e2e => test}/no_sycl_hpp_in_e2e_tests.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename sycl/{test-e2e => test}/no_sycl_hpp_in_e2e_tests.cpp (57%) diff --git a/sycl/test-e2e/no_sycl_hpp_in_e2e_tests.cpp b/sycl/test/no_sycl_hpp_in_e2e_tests.cpp similarity index 57% rename from sycl/test-e2e/no_sycl_hpp_in_e2e_tests.cpp rename to sycl/test/no_sycl_hpp_in_e2e_tests.cpp index a7c2329b23dc7..ad906f3b4c799 100644 --- a/sycl/test-e2e/no_sycl_hpp_in_e2e_tests.cpp +++ b/sycl/test/no_sycl_hpp_in_e2e_tests.cpp @@ -1,13 +1,12 @@ // REQUIRES: linux // -// RUN: grep -r -l 'sycl.hpp' %S | FileCheck %s -// RUN: grep -r -l 'sycl.hpp' %S | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES +// RUN: grep -r -l 'sycl.hpp' %S/../test-e2e | FileCheck %s +// RUN: grep -r -l 'sycl.hpp' %S/../test-e2e | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES // // CHECK-DAG: README.md -// CHECK-DAG: no_sycl_hpp_in_e2e_tests.cpp // CHECK-DAG: lit.cfg.py // -// CHECK-NUM-MATCHES: 5 +// CHECK-NUM-MATCHES: 4 // // This test verifies that `` isn't used in E2E tests. Instead, // fine-grained includes should used, see From 8ffc24cb58c9597e8ce380e607232234c53c8165 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 24 Oct 2024 11:17:52 -0700 Subject: [PATCH 2/2] add step in CI build to run these tests Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-linux-build.yml | 6 ++++++ .../no-xfail-without-tracker.cpp | 4 ++-- .../no_sycl_hpp_in_e2e_tests.cpp | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) rename sycl/test/{ => e2e_test_requirements}/no-xfail-without-tracker.cpp (99%) rename sycl/test/{ => e2e_test_requirements}/no_sycl_hpp_in_e2e_tests.cpp (64%) diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 17dcc83aeb437..0b6eebda045ab 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -212,6 +212,12 @@ jobs: if: always() && !cancelled() && contains(inputs.changes, 'libdevice') run: | cmake --build $GITHUB_WORKSPACE/build --target check-libdevice + - name: Check E2E test requirements + if: always() && !cancelled() && !contains(inputs.changes, 'sycl') + run: | + # TODO consider moving this to Dockerfile. + export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH + LIT_OPTS="--allow-empty-runs" LIT_FILTER="e2e_test_requirements" cmake --build $GITHUB_WORKSPACE/build --target check-sycl - name: Install if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }} # TODO replace utility installation with a single CMake target diff --git a/sycl/test/no-xfail-without-tracker.cpp b/sycl/test/e2e_test_requirements/no-xfail-without-tracker.cpp similarity index 99% rename from sycl/test/no-xfail-without-tracker.cpp rename to sycl/test/e2e_test_requirements/no-xfail-without-tracker.cpp index 7cb524dab5c47..f36b3793b6d9f 100644 --- a/sycl/test/no-xfail-without-tracker.cpp +++ b/sycl/test/e2e_test_requirements/no-xfail-without-tracker.cpp @@ -25,10 +25,10 @@ // verify that against the reference // - ...and check if the list of improperly XFAIL-ed tests needs to be updated. // -// RUN: grep -rI "XFAIL:" %S/../test-e2e \ +// RUN: grep -rI "XFAIL:" %S/../../test-e2e \ // RUN: -A 1 --include=*.c --include=*.cpp --no-group-separator | \ // RUN: grep -v "XFAIL:" | \ -// RUN: grep -Pv "XFAIL-TRACKER:\s+(?:https://github.com/[\w\d-]+/[\w\d-]+/issues/[\d]+)|(?:[\w]+-[\d]+)" > %t | \ +// RUN: grep -Pv "XFAIL-TRACKER:\s+(?:https://github.com/[\w\d-]+/[\w\d-]+/issues/[\d]+)|(?:[\w]+-[\d]+)" > %t // RUN: cat %t | wc -l | FileCheck %s --check-prefix NUMBER-OF-XFAIL-WITHOUT-TRACKER // RUN: cat %t | sed 's/\.cpp.*/.cpp/' | sort | FileCheck %s // diff --git a/sycl/test/no_sycl_hpp_in_e2e_tests.cpp b/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp similarity index 64% rename from sycl/test/no_sycl_hpp_in_e2e_tests.cpp rename to sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp index ad906f3b4c799..652169c1082f1 100644 --- a/sycl/test/no_sycl_hpp_in_e2e_tests.cpp +++ b/sycl/test/e2e_test_requirements/no_sycl_hpp_in_e2e_tests.cpp @@ -1,7 +1,7 @@ // REQUIRES: linux // -// RUN: grep -r -l 'sycl.hpp' %S/../test-e2e | FileCheck %s -// RUN: grep -r -l 'sycl.hpp' %S/../test-e2e | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES +// RUN: grep -r -l 'sycl.hpp' %S/../../test-e2e | FileCheck %s +// RUN: grep -r -l 'sycl.hpp' %S/../../test-e2e | wc -l | FileCheck %s --check-prefix CHECK-NUM-MATCHES // // CHECK-DAG: README.md // CHECK-DAG: lit.cfg.py