[llvm] [libc][bazel] Add bazel targets for libc/include/... tests. (PR #141150)
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 15:45:23 PDT 2025
================
@@ -12,36 +12,56 @@ They come in two flavors:
When performing tests we make sure to always use the internal version.
"""
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+load("@rules_cc//cc:cc_test.bzl", "cc_test")
load("//libc:libc_build_rules.bzl", "libc_common_copts")
load("//libc:libc_configure_options.bzl", "LIBC_CONFIGURE_OPTIONS")
-def libc_test(name, copts = [], deps = [], local_defines = [], **kwargs):
+def _libc_test(
+ name,
+ copts = [],
+ deps = [],
+ local_defines = [],
+ use_test_framework = True,
----------------
vonosmas wrote:
I think that instead of adding one more indirection, you may just add `use_test_framework = False` as an optional kwarg to `libc_test`, and specify it everywhere you need, instead of wrapping it in new `libc_c_test` macro. I may very well imagine that for some of the C++ test cases we also wouldn't want to add unit test framework. Conversely, it's not that big of a deal to add `use_test_framework` to all C test targets you're adding.
https://github.com/llvm/llvm-project/pull/141150
More information about the llvm-commits
mailing list