[PATCH v4 01/18] selftests/nolibc: add run-libc-test target

From: Zhangjin Wu
Date: Fri Jul 07 2023 - 14:23:03 EST


allow run and report glibc or musl based libc-test.

Signed-off-by: Zhangjin Wu <falcon@xxxxxxxxxxx>
---
tools/testing/selftests/nolibc/Makefile | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 000621f21adc..d408b688b291 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -132,6 +132,10 @@ nolibc-test: nolibc-test.c sysroot/$(ARCH)/include
libc-test: nolibc-test.c
$(QUIET_CC)$(CC) -o $@ $<

+run-libc-test: libc-test
+ $(Q)./libc-test > "$(CURDIR)/run.out" || :
+ $(Q)$(REPORT) $(CURDIR)/run.out
+
# qemu user-land test
run-user: nolibc-test
$(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || :
--
2.25.1