[coreboot-gerrit] New patch to review for coreboot: 627747f util/cbmem/Makfile: Add rule `junit.xml` for Jenkins

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Sat Jan 4 12:25:21 CET 2014


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4611

-gerrit

commit 627747f7217b78dba5ad101c48c4d234cf21a2b4
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Sat Jan 4 12:19:18 2014 +0100

    util/cbmem/Makfile: Add rule `junit.xml` for Jenkins
    
    The rule has the target `junit.xml` and runs `make clean` and `make` and
    logs the result in the file `junit.xml` suitable for consumption by
    Jenkins.
    
    Change-Id: I42a31f6c7a45fa9c3773969d78f745fcc4e09dbd
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 util/cbmem/Makefile | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index 51ee927..fe9e923 100644
--- a/util/cbmem/Makefile
+++ b/util/cbmem/Makefile
@@ -42,3 +42,21 @@ distclean: clean
 .PHONY: all clean distclean
 
 -include .dependencies
+
+junit.xml:
+	echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp
+	$(MAKE) clean; \
+	echo "<testcase classname='cbmem' name='cbmem'>" >> $@.tmp; \
+	$(MAKE) >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \
+	if [ $$type = "failure" ]; then \
+		echo "<failure type='buildFailed'>" >> $@.tmp; \
+	else \
+		echo "<$$type>" >> $@.tmp; \
+	fi; \
+	echo '<![CDATA[' >> $@.tmp; \
+	cat $@.tmp.2 >> $@.tmp; \
+	echo "]]></$$type>" >>$@.tmp; \
+	rm -f $@.tmp.2; \
+	echo "</testcase>" >> $@.tmp; \
+	echo "</testsuite>" >> $@.tmp
+	mv $@.tmp $@



More information about the coreboot-gerrit mailing list