[llvm] [SYCL] E2E LIT tests initial configs & test (PR #177407)

Dmitry Rogozhkin via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 10:02:41 PST 2026


================
@@ -0,0 +1,93 @@
+## Getting Started
+
+This directory contains SYCL-related end-to-end tests distributed in
+subdirectories based on testing scope. `libsycl` uses LIT to configure and run
+its tests.
+
+Please see the [Lit Command Guide](https://llvm.org/docs/CommandGuide/lit.html)
+for more information about LIT.
+
+## Prerequisites
+
+* Target runtime(s) to execute tests on devices.
+  TODO: add link to liboffload instruction once they add it.
+* Compiler & libsycl. Can be built following these
+  [instructions](/libsycl/docs/index.rst).
+
+## Run the tests
+
+`libsycl` is integrated via LLVM_ENABLE_RUNTIMES and is not visible as top
+level target. Same is applicable for tests. To run `check-sycl-e2e` tests you
+need to prefix <build>/runtimes/runtimes-bins/ to the paths of all tests.
+For example, to run all the libsycl end-to-end tests you can do:
+```bash
+<build>/bin/llvm-lit <build>/runtimes/runtimes-bins/libsycl/test_e2e
+```
+
+To run individual test use the path to it instead of the top level `test_e2e`
+directory.
+
+If you used ninja as your build system, you can run all the tests in the
+libsycl testsuite as:
+
+```bash
+ ninja -C <build>/runtimes/runtimes-bins check-sycl-e2e
+ ```
+
+
+## CMake parameters
+
+These parameters can be used to configure tests:
+
+***LIBSYCL_CXX_COMPILER*** - path to compiler to use it for building tests.
+
+***LIBSYCL_E2E_CXX_FLAGS*** - flags to be passed to LIBSYCL_CXX_COMPILER when
+    building libsycl end-to-end tests.
+
+***LLVM_LIT*** - path to llvm-lit tool.
+
+***LEVEL_ZERO_INCLUDE_DIR*** - path to Level Zero headers.
+
+***LEVEL_ZERO_LIBS_DIR*** - path to Level Zero libraries.
+
+## Creating or modifying tests
+
+### LIT feature checks
+
+Following features can be checked in tests to limit test execution to the
+specific environment via REQUIRES, UNSUPPORTED, etc. filters.
----------------
dvrogozh wrote:

```suggestion
Following features can be passed to LIT via `REQUIRES`, `UNSUPPORTED`, etc. filters.
to limit test execution to the specific environment.
```

https://github.com/llvm/llvm-project/pull/177407


More information about the llvm-commits mailing list