util: update junit.xml target
- Display what's happening to the console as well as logging to the junit.xml file. - Log the clean in the junit.xml file so if it fails it doesn't just appear to not have run the test. - Run both clean and distclean (if distclean exists and runs clean, this still only runs clean once) so that if distclean doesn't exist the clean still happens. Don't stop the build if the clean step fails in case there's no distclean in the util makefile. - Run the util builds multithreaded. This saves a couple of seconds and helps find dependency issues that might not be seen if building single-threaded. Change-Id: If895295c83faba98661b7c925b65fd436e06b834 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12121 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
0be83c09a0
commit
917acb5656
11
Makefile.inc
11
Makefile.inc
|
@ -682,14 +682,18 @@ $(obj)/board_id:
|
||||||
printf $(CONFIG_BOARD_ID_STRING) > $@
|
printf $(CONFIG_BOARD_ID_STRING) > $@
|
||||||
|
|
||||||
junit.xml:
|
junit.xml:
|
||||||
|
echo "Building $(UTIL)"
|
||||||
echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp
|
echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp
|
||||||
$(MAKE) -C "util/$(UTIL)" distclean > /dev/null 2>&1
|
|
||||||
echo "<testcase classname='$(UTIL)' name='$(UTIL)'>" >> $@.tmp
|
echo "<testcase classname='$(UTIL)' name='$(UTIL)'>" >> $@.tmp
|
||||||
$(MAKE) -C "util/$(UTIL)" >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \
|
-$(MAKE) -j $(CPUS) -C "util/$(UTIL)" clean distclean > $@.tmp.2 2>&1
|
||||||
|
$(MAKE) -j $(CPUS) -C "util/$(UTIL)" >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \
|
||||||
|
cat $@.tmp.2; \
|
||||||
if [ "$$type" = "failure" ]; then \
|
if [ "$$type" = "failure" ]; then \
|
||||||
echo "<failure type='buildFailed'>" >> $@.tmp; \
|
echo "<failure type='buildFailed'>" >> $@.tmp; \
|
||||||
|
echo "Building $(UTIL) Failed"; \
|
||||||
else \
|
else \
|
||||||
echo "<$$type>" >> $@.tmp; \
|
echo "<$$type>" >> $@.tmp; \
|
||||||
|
echo "Building $(UTIL) Succeeded"; \
|
||||||
fi; \
|
fi; \
|
||||||
echo '<![CDATA[' >> $@.tmp; \
|
echo '<![CDATA[' >> $@.tmp; \
|
||||||
cat $@.tmp.2 >> $@.tmp; \
|
cat $@.tmp.2 >> $@.tmp; \
|
||||||
|
@ -698,6 +702,7 @@ junit.xml:
|
||||||
echo "</testcase>" >> $@.tmp
|
echo "</testcase>" >> $@.tmp
|
||||||
echo "</testsuite>" >> $@.tmp
|
echo "</testsuite>" >> $@.tmp
|
||||||
mv $@.tmp "util/$(UTIL)/$@"
|
mv $@.tmp "util/$(UTIL)/$@"
|
||||||
|
echo
|
||||||
|
|
||||||
TOOLLIST= \
|
TOOLLIST= \
|
||||||
cbmem \
|
cbmem \
|
||||||
|
@ -710,4 +715,4 @@ what-jenkins-does:
|
||||||
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml
|
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml
|
||||||
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)
|
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)
|
||||||
(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)
|
(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)
|
||||||
$(foreach tool, $(TOOLLIST), $(MAKE) V=$(V) Q=$(Q) UTIL="$(tool)" MFLAGS= MAKEFLAGS= junit.xml; )
|
$(foreach tool, $(TOOLLIST), $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) UTIL="$(tool)" MFLAGS= MAKEFLAGS= junit.xml; )
|
||||||
|
|
Loading…
Reference in New Issue