From: Zhangjin Wu <falcon@tinylab.org> To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, thomas@t-8ch.de Subject: [PATCH 1/4] selftests/nolibc: add a test-report target Date: Mon, 5 Jun 2023 11:48:52 +0800 [thread overview] Message-ID: <291c5437db94057a3b045a6f036b02658380b05b.1685936428.git.falcon@tinylab.org> (raw) In-Reply-To: <cover.1685936428.git.falcon@tinylab.org> A standalone test-report target is added to let the run, run-user and rerun targets share them. Signed-off-by: Zhangjin Wu <falcon@tinylab.org> --- tools/testing/selftests/nolibc/Makefile | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index be4159837494..8149ace2938a 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -127,14 +127,18 @@ nolibc-test: nolibc-test.c sysroot/$(ARCH)/include libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< -# qemu user-land test -run-user: nolibc-test - $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : +test-report: $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ $(CURDIR)/run.out +# qemu user-land test +_run-user: nolibc-test + $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : + +run-user: _run-user test-report + initramfs: nolibc-test $(QUIET_MKDIR)mkdir -p initramfs $(call QUIET_INSTALL, initramfs/init) @@ -147,20 +151,16 @@ kernel: initramfs $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs # run the tests after building the kernel -run: kernel +_run: kernel $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" - $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ - END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ - if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ - $(CURDIR)/run.out + +run: _run test-report # re-run the tests from an existing kernel -rerun: +_rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" - $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ - END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ - if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ - $(CURDIR)/run.out + +rerun: _rerun test-report clean: $(call QUIET_CLEAN, sysroot) -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Zhangjin Wu <falcon@tinylab.org> To: w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, thomas@t-8ch.de Subject: [PATCH 1/4] selftests/nolibc: add a test-report target Date: Mon, 5 Jun 2023 11:48:52 +0800 [thread overview] Message-ID: <291c5437db94057a3b045a6f036b02658380b05b.1685936428.git.falcon@tinylab.org> (raw) In-Reply-To: <cover.1685936428.git.falcon@tinylab.org> A standalone test-report target is added to let the run, run-user and rerun targets share them. Signed-off-by: Zhangjin Wu <falcon@tinylab.org> --- tools/testing/selftests/nolibc/Makefile | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index be4159837494..8149ace2938a 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -127,14 +127,18 @@ nolibc-test: nolibc-test.c sysroot/$(ARCH)/include libc-test: nolibc-test.c $(QUIET_CC)$(CC) -o $@ $< -# qemu user-land test -run-user: nolibc-test - $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : +test-report: $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ $(CURDIR)/run.out +# qemu user-land test +_run-user: nolibc-test + $(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || : + +run-user: _run-user test-report + initramfs: nolibc-test $(QUIET_MKDIR)mkdir -p initramfs $(call QUIET_INSTALL, initramfs/init) @@ -147,20 +151,16 @@ kernel: initramfs $(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs # run the tests after building the kernel -run: kernel +_run: kernel $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" - $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ - END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ - if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ - $(CURDIR)/run.out + +run: _run test-report # re-run the tests from an existing kernel -rerun: +_rerun: $(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) > "$(CURDIR)/run.out" - $(Q)awk '/\[OK\]$$/{p++} /\[FAIL\]$$/{f++} /\[SKIPPED\]$$/{s++} \ - END{ printf("%d test(s) passed, %d skipped, %d failed.", p, s, f); \ - if (s+f > 0) printf(" See all results in %s\n", ARGV[1]); else print; }' \ - $(CURDIR)/run.out + +rerun: _rerun test-report clean: $(call QUIET_CLEAN, sysroot) -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-06-05 3:49 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-05 3:47 [PATCH 0/4] selftests/nolibc: fix up and improve test report Zhangjin Wu 2023-06-05 3:47 ` Zhangjin Wu 2023-06-05 3:48 ` Zhangjin Wu [this message] 2023-06-05 3:48 ` [PATCH 1/4] selftests/nolibc: add a test-report target Zhangjin Wu 2023-06-05 4:18 ` Willy Tarreau 2023-06-05 4:18 ` Willy Tarreau 2023-06-05 6:54 ` Zhangjin Wu 2023-06-05 6:54 ` Zhangjin Wu 2023-06-07 5:52 ` Zhangjin Wu 2023-06-07 5:52 ` Zhangjin Wu 2023-06-07 12:45 ` Willy Tarreau 2023-06-07 12:45 ` Willy Tarreau 2023-06-07 14:15 ` Zhangjin Wu 2023-06-07 14:15 ` Zhangjin Wu 2023-06-05 3:50 ` [PATCH 2/4] selftests/nolibc: allow run test-report directly Zhangjin Wu 2023-06-05 3:50 ` Zhangjin Wu 2023-06-05 3:57 ` [PATCH 3/4] selftests/nolibc: always print the log file Zhangjin Wu 2023-06-05 3:57 ` Zhangjin Wu 2023-06-05 4:20 ` Willy Tarreau 2023-06-05 4:20 ` Willy Tarreau 2023-06-05 7:05 ` Zhangjin Wu 2023-06-05 7:05 ` Zhangjin Wu 2023-06-05 3:58 ` [PATCH 4/4] selftests/nolibc: fix up test-report for run target Zhangjin Wu 2023-06-05 3:58 ` Zhangjin Wu 2023-06-05 4:23 ` Willy Tarreau 2023-06-05 4:23 ` Willy Tarreau 2023-06-05 6:32 ` [PATCH 0/4] selftests/nolibc: fix up and improve test report Willy Tarreau 2023-06-05 6:32 ` Willy Tarreau 2023-06-05 10:53 ` Zhangjin Wu 2023-06-05 10:53 ` Zhangjin Wu 2023-06-06 4:50 ` Willy Tarreau 2023-06-06 4:50 ` Willy Tarreau
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=291c5437db94057a3b045a6f036b02658380b05b.1685936428.git.falcon@tinylab.org \ --to=falcon@tinylab.org \ --cc=arnd@arndb.de \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-kselftest@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=thomas@t-8ch.de \ --cc=w@1wt.eu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.