Patchwork [22/22] qapi: generate HTML report for test-libqmp

login
register
mail settings
Submitter Anthony Liguori
Date March 7, 2011, 1:23 a.m.
Message ID <1299460984-15849-23-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/85630/
State New
Headers show

Comments

Anthony Liguori - March 7, 2011, 1:23 a.m.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori - March 7, 2011, 2:11 a.m.
On 03/06/2011 07:23 PM, Anthony Liguori wrote:
> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>    

For an example of how this looks when we've got more test cases with an 
artificial failure injected:

http://www.codemonkey.ws/files/test-report.html

Regards,

Anthony Liguori

> diff --git a/Makefile b/Makefile
> index 1d363d7..c5a4820 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -216,6 +216,15 @@ LIBQMP_OBJS += $(oslib-obj-y) $(trace-obj-y) qemu-malloc.o
>
>   test-libqmp: test-libqmp.o $(LIBQMP_OBJS) qemu-timer-common.o
>
> +check: test-libqmp
> +	$(call quiet-command, ./test-libqmp, "  CHECK   $@")
> +
> +test-report.html: test-report.log
> +	$(call quiet-command, gtester-report $<  >  $@, "  GEN   $@")
> +
> +test-report.log: test-libqmp
> +	$(call quiet-command, gtester -k -o $@ ./test-libqmp 2>/dev/null>/dev/null || true, "  TEST  $<")
> +
>   clean:
>   # avoid old build problems by removing potentially incorrect old files
>   	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
>

Patch

diff --git a/Makefile b/Makefile
index 1d363d7..c5a4820 100644
--- a/Makefile
+++ b/Makefile
@@ -216,6 +216,15 @@  LIBQMP_OBJS += $(oslib-obj-y) $(trace-obj-y) qemu-malloc.o
 
 test-libqmp: test-libqmp.o $(LIBQMP_OBJS) qemu-timer-common.o
 
+check: test-libqmp
+	$(call quiet-command, ./test-libqmp, "  CHECK   $@")
+
+test-report.html: test-report.log
+	$(call quiet-command, gtester-report $< > $@, "  GEN   $@")
+
+test-report.log: test-libqmp
+	$(call quiet-command, gtester -k -o $@ ./test-libqmp 2>/dev/null >/dev/null || true, "  TEST  $<")
+
 clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h