summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2013-12-21 21:08:53 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2014-01-08 13:24:45 +0100
commit34286b861a9427520f3f3afb8bf64bfa7de37c24 (patch)
tree1d16437ff81ee3ce1b460c229eb196ea05296823 /payloads
parent25cd678d22e236716c23d6d115139a29f86f7fae (diff)
libpayload: add junit.xml build target
It builds all defconfigs/* and logs the results in junit.xml, suitable for consumption by jenkins Change-Id: I86c4022851b47820c95359b2ea9b735a77b1bc2c Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/4551 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/Makefile.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index 8961dd64e6..ea1bcff25c 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -117,3 +117,25 @@ clean-for-update-target:
clean-target:
prepare:
+
+junit.xml:
+ echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp
+ for i in $(filter-out %.old,$(wildcard configs/*)); do \
+ $(MAKE) clean; \
+ yes | $(MAKE) oldconfig DOTCONFIG=$$i 2>/dev/null >/dev/null; \
+ echo "<testcase classname='libpayload' name='$$i'>" >> $@.tmp; \
+ $(MAKE) CONFIG_CCACHE=$(CONFIG_CCACHE) DOTCONFIG=$$i >> $@.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; \
+ done
+ echo "</testsuite>" >> $@.tmp
+ mv $@.tmp $@
+