[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

Fraser Cormack via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 05:18:25 PDT 2025


================
@@ -0,0 +1,57 @@
+import os
+
+import lit.formats
+import lit.util
+
+from lit.llvm import llvm_config
+from lit.llvm.subst import ToolSubst
+from lit.llvm.subst import FindTool
+
+# Configuration file for the 'lit' test runner.
+
+# name: The name of this test suite.
+config.name = "libclc"
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = [
+    ".cl",
+]
+
+# test_source_root: The root path where tests are located.
+config.test_source_root = os.path.join(os.path.dirname(__file__))
+
+# test_exec_root: The root path where tests should be run.
+config.test_exec_root = os.path.join(config.test_run_dir, "test")
+
+llvm_config.use_default_substitutions()
+
+target = lit_config.params.get("target", "")
+builtins = lit_config.params.get("builtins", "")
+
+clang_flags = [
----------------
frasercrmck wrote:

This has now gone, mostly as a consequence of using `update_cc_test_checks.py`. The flags are generally now spelled out in `RUN` lines, as `update_cc_test_checks.py` doesn't support substitutions.

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


More information about the llvm-commits mailing list