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>
This commit is contained in:
parent
a151c12329
commit
8ebc72cdda
|
@ -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 $@
|
||||
|
|
Loading…
Reference in New Issue