summaryrefslogtreecommitdiff
path: root/tools/build/feature
diff options
context:
space:
mode:
authorCosta Shulyupin <costa.shul@redhat.com>2026-01-19 12:58:56 +0200
committerTomas Glozar <tglozar@redhat.com>2026-03-04 15:51:56 +0100
commit153e211fc74a096cbd3570ca7388ab4cbeadc6c5 (patch)
tree56c0832a983f4bf815a03d627d6ea827833ba628 /tools/build/feature
parent4a1cec7450b7159a0ee57403f44460ac4d618b4f (diff)
downloadlinux-next-153e211fc74a096cbd3570ca7388ab4cbeadc6c5.tar.gz
linux-next-153e211fc74a096cbd3570ca7388ab4cbeadc6c5.zip
tools/build: Add feature test for libcheck
Enable support for unit tests in rtla. Note that the pkg-config file for libcheck is named check.pc. Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Link: https://lore.kernel.org/r/20260119105857.797498-2-costa.shul@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'tools/build/feature')
-rw-r--r--tools/build/feature/Makefile4
-rw-r--r--tools/build/feature/test-libcheck.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 1fbcb3ce74d2..99bdc8a6d26e 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -50,6 +50,7 @@ FILES= \
test-timerfd.bin \
test-libbabeltrace.bin \
test-libcapstone.bin \
+ test-libcheck.bin \
test-compile-32.bin \
test-compile-x32.bin \
test-zlib.bin \
@@ -307,6 +308,9 @@ $(OUTPUT)test-libbabeltrace.bin:
$(OUTPUT)test-libcapstone.bin:
$(BUILD) # -lcapstone provided by $(FEATURE_CHECK_LDFLAGS-libcapstone)
+$(OUTPUT)test-libcheck.bin:
+ $(BUILD) # -lcheck is provided by $(FEATURE_CHECK_LDFLAGS-libcheck)
+
$(OUTPUT)test-compile-32.bin:
$(CC) -m32 -Wall -Werror -o $@ test-compile.c
diff --git a/tools/build/feature/test-libcheck.c b/tools/build/feature/test-libcheck.c
new file mode 100644
index 000000000000..cfb8d452e9ef
--- /dev/null
+++ b/tools/build/feature/test-libcheck.c
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <check.h>
+
+int main(void)
+{
+ Suite *s = suite_create("test");
+ return s == 0;
+}