summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2014-01-04 12:19:18 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2014-01-11 17:40:38 +0100
commit8ebc72cddae96aac8728f8ffc6882637ea073cec (patch)
treee800cace106e3ebaaf03e29e93c3b2b52c9c0fef
parenta151c1232988bb62612bd4000b0fd9ec297893b9 (diff)
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@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/4611 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
-rw-r--r--util/cbmem/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index 51ee927d91..fe9e9234f9 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 $@