blob: f5a4c5e6fc41929469b1a64d8241d21749146cde [file] [log] [blame]
Martin Rothe624e272017-07-31 11:52:58 -06001##
2## This file is part of the coreboot project.
3##
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; version 2 of the License.
7##
8## This program is distributed in the hope that it will be useful,
9## but WITHOUT ANY WARRANTY; without even the implied warranty of
10## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11## GNU General Public License for more details.
12##
13
14junit.xml:
15 echo "Building $(BLD)"
16 echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp
17 echo "<testcase classname='$(BLD)' name='$(BLD)'>" >> $@.tmp
18 -$(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" clean distclean > $@.tmp.2 2>&1
19 $(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" $(MAKETARGET) >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \
20 cat $@.tmp.2; \
21 if [ "$$type" = "failure" ]; then \
22 echo "<failure type='buildFailed'>" >> $@.tmp; \
23 echo "Building $(BLD) Failed"; \
24 else \
25 echo "<$$type>" >> $@.tmp; \
26 echo "Building $(BLD) Succeeded"; \
27 fi; \
28 echo '<![CDATA[' >> $@.tmp; \
29 cat $@.tmp.2 >> $@.tmp; \
30 echo "]]></$$type>" >>$@.tmp
31 rm -f $@.tmp.2
32 echo "</testcase>" >> $@.tmp
33 echo "</testsuite>" >> $@.tmp
34 mv $@.tmp "$(BLD_DIR)$(BLD)/$@"
35 echo
36
37TOOLLIST= \
38 cbmem \
39 ectool \
40 futility \
41 inteltool \
42 intelvbttool \
43 nvramtool \
44 superiotool \
45 viatool
46JENKINS_PAYLOAD?=none
47CPUS?=4
48what-jenkins-does:
49 util/lint/lint lint-stable --junit
50 util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml
51 util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)
52 (cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)
53 $(foreach tool, $(TOOLLIST), $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD="$(tool)" MFLAGS= MAKEFLAGS= MAKETARGET= junit.xml; )
54 unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=nvramcui MFLAGS= MAKEFLAGS= MAKETARGET=all junit.xml
55 unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=coreinfo MFLAGS= MAKEFLAGS= MAKETARGET=defaultbuild junit.xml
56 $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD=romcc MFLAGS= MAKEFLAGS= MAKETARGET=test junit.xml