[libclc] [libclc][CMake] Add check-libclc umbrella test target (PR #186053)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 01:23:14 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD libclc/test/lit.cfg.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- lit.cfg.py	2026-03-12 08:19:11.000000 +0000
+++ lit.cfg.py	2026-03-12 08:22:44.248211 +0000
@@ -7,37 +7,40 @@
 import lit.formats
 
 # Configuration file for the 'lit' test runner.
 
 # name: The name of this test suite.
-config.name = 'libclc'
+config.name = "libclc"
 
 # testFormat: The test format to use to interpret tests.
 config.test_format = lit.formats.ShTest(True)
 
 # suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.test']
+config.suffixes = [".test"]
 
 # Exclude certain directories from test discovery
-config.excludes = ['CMakeLists.txt']
+config.excludes = ["CMakeLists.txt"]
 
 # test_source_root: The root path where tests are located.
 # For per-target tests, this is the target's test directory.
 config.test_source_root = config.libclc_obj_root
 
 # test_exec_root: The root path where tests should be run.
 config.test_exec_root = config.libclc_obj_root
 
 # Propagate PATH from environment
-if 'PATH' in os.environ:
-    config.environment['PATH'] = os.path.pathsep.join([
-        config.llvm_tools_dir,
-        os.environ['PATH']
-    ])
+if "PATH" in os.environ:
+    config.environment["PATH"] = os.path.pathsep.join(
+        [config.llvm_tools_dir, os.environ["PATH"]]
+    )
 else:
-    config.environment['PATH'] = config.llvm_tools_dir
+    config.environment["PATH"] = config.llvm_tools_dir
 
 # Define substitutions for the test files
-config.substitutions.append(('%libclc_library_dir', config.libclc_library_dir))
-config.substitutions.append(('%llvm_tools_dir', config.llvm_tools_dir))
-config.substitutions.append(('%check_external_funcs',
-                            os.path.join(config.libclc_test_root, 'check_external_funcs.sh')))
+config.substitutions.append(("%libclc_library_dir", config.libclc_library_dir))
+config.substitutions.append(("%llvm_tools_dir", config.llvm_tools_dir))
+config.substitutions.append(
+    (
+        "%check_external_funcs",
+        os.path.join(config.libclc_test_root, "check_external_funcs.sh"),
+    )
+)

``````````

</details>


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


More information about the cfe-commits mailing list