linux/tools/testing/selftests/nolibc/Makefile
Thomas Weißschuh eb13531108 selftests/nolibc: integrate with kselftests
Hook up nolibc-test with the kselftests framework.
This enables CI systems and developers to easily execute the tests.

While nolibc-test does not emit KTAP output itself that is not a problem,
as the kselftest executor will wrap the output in KTAP.

Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250620-nolibc-selftests-v1-4-f6b2ce7c5071@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
2025-06-23 22:56:21 +02:00

27 lines
615 B
Makefile

# SPDX-License-Identifier: GPL-2.0
TEST_GEN_PROGS := nolibc-test
include ../lib.mk
include $(top_srcdir)/scripts/Makefile.compiler
cc-option = $(call __cc-option, $(CC),,$(1),$(2))
include Makefile.include
CFLAGS = -nostdlib -nostdinc -static \
-isystem $(top_srcdir)/tools/include/nolibc -isystem $(top_srcdir)/usr/include \
$(CFLAGS_NOLIBC_TEST)
ifeq ($(LLVM),)
LDLIBS := -lgcc
endif
$(OUTPUT)/nolibc-test: nolibc-test.c nolibc-test-linkage.c | headers
help:
@echo "For the custom nolibc testsuite use '$(MAKE) -f Makefile.nolibc'; available targets:"
@$(MAKE) -f Makefile.nolibc help
.PHONY: help