<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20873">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Make: Move testing into a subdirectory<br><br>In preparation for expanding the testing, move the test targets<br>out of the top level Makefile.inc and into a separate<br>subdirectory.<br><br>Change-Id: Ie252c7555223f9ce76b54e6f7b66d03f3cf60500<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M Makefile<br>M Makefile.inc<br>A util/testing/Makefile.inc<br>3 files changed, 58 insertions(+), 45 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/20873/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/Makefile b/Makefile<br>index 31fb3ad..ff9a6b8 100644<br>--- a/Makefile<br>+++ b/Makefile<br>@@ -124,6 +124,7 @@<br> ifeq ($(NOCOMPILE),1)<br> include $(TOPLEVEL)/Makefile.inc<br> include $(TOPLEVEL)/payloads/Makefile.inc<br>+include $(TOPLEVEL)/util/testing/Makefile.inc<br> real-all:<br> @echo "Error: Expected config file ($(DOTCONFIG)) not present." >&2<br> @echo "Please specify a config file or run 'make menuconfig' to" >&2<br>diff --git a/Makefile.inc b/Makefile.inc<br>index 5730201..9decd65 100644<br>--- a/Makefile.inc<br>+++ b/Makefile.inc<br>@@ -93,7 +93,7 @@<br> subdirs-y += payloads payloads/external<br> <br> subdirs-y += site-local<br>-subdirs-y += util/checklist<br>+subdirs-y += util/checklist util/testing<br> <br> #######################################################################<br> # Add source classes and their build options<br>@@ -1041,47 +1041,3 @@<br> INTERMEDIATE+=check-ramstage-overlaps<br> PHONY+=check-ramstage-overlaps<br> endif<br>-<br>-junit.xml:<br>- echo "Building $(BLD)"<br>- echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp<br>- echo "<testcase classname='$(BLD)' name='$(BLD)'>" >> $@.tmp<br>- -$(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" clean distclean > $@.tmp.2 2>&1<br>- $(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" $(MAKETARGET) >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \<br>- cat $@.tmp.2; \<br>- if [ "$$type" = "failure" ]; then \<br>- echo "<failure type='buildFailed'>" >> $@.tmp; \<br>- echo "Building $(BLD) Failed"; \<br>- else \<br>- echo "<$$type>" >> $@.tmp; \<br>- echo "Building $(BLD) Succeeded"; \<br>- fi; \<br>- echo '<![CDATA[' >> $@.tmp; \<br>- cat $@.tmp.2 >> $@.tmp; \<br>- echo "]]></$$type>" >>$@.tmp<br>- rm -f $@.tmp.2<br>- echo "</testcase>" >> $@.tmp<br>- echo "</testsuite>" >> $@.tmp<br>- mv $@.tmp "$(BLD_DIR)$(BLD)/$@"<br>- echo<br>-<br>-TOOLLIST= \<br>- cbmem \<br>- ectool \<br>- futility \<br>- inteltool \<br>- intelvbttool \<br>- nvramtool \<br>- superiotool \<br>- viatool<br>-JENKINS_PAYLOAD?=none<br>-CPUS?=4<br>-what-jenkins-does:<br>- util/lint/lint lint-stable --junit<br>- util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml<br>- util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)<br>- (cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)<br>- $(foreach tool, $(TOOLLIST), $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD="$(tool)" MFLAGS= MAKEFLAGS= MAKETARGET= junit.xml; )<br>- unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=nvramcui MFLAGS= MAKEFLAGS= MAKETARGET=all junit.xml<br>- unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=coreinfo MFLAGS= MAKEFLAGS= MAKETARGET=defaultbuild junit.xml<br>- $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD=romcc MFLAGS= MAKEFLAGS= MAKETARGET=test junit.xml<br>diff --git a/util/testing/Makefile.inc b/util/testing/Makefile.inc<br>new file mode 100644<br>index 0000000..f5a4c5e<br>--- /dev/null<br>+++ b/util/testing/Makefile.inc<br>@@ -0,0 +1,56 @@<br>+##<br>+## This file is part of the coreboot project.<br>+##<br>+## This program is free software; you can redistribute it and/or modify<br>+## it under the terms of the GNU General Public License as published by<br>+## the Free Software Foundation; version 2 of the License.<br>+##<br>+## This program is distributed in the hope that it will be useful,<br>+## but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>+## GNU General Public License for more details.<br>+##<br>+<br>+junit.xml:<br>+ echo "Building $(BLD)"<br>+ echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp<br>+ echo "<testcase classname='$(BLD)' name='$(BLD)'>" >> $@.tmp<br>+ -$(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" clean distclean > $@.tmp.2 2>&1<br>+ $(MAKE) -j $(CPUS) -C "$(BLD_DIR)$(BLD)" $(MAKETARGET) >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \<br>+ cat $@.tmp.2; \<br>+ if [ "$$type" = "failure" ]; then \<br>+ echo "<failure type='buildFailed'>" >> $@.tmp; \<br>+ echo "Building $(BLD) Failed"; \<br>+ else \<br>+ echo "<$$type>" >> $@.tmp; \<br>+ echo "Building $(BLD) Succeeded"; \<br>+ fi; \<br>+ echo '<![CDATA[' >> $@.tmp; \<br>+ cat $@.tmp.2 >> $@.tmp; \<br>+ echo "]]></$$type>" >>$@.tmp<br>+ rm -f $@.tmp.2<br>+ echo "</testcase>" >> $@.tmp<br>+ echo "</testsuite>" >> $@.tmp<br>+ mv $@.tmp "$(BLD_DIR)$(BLD)/$@"<br>+ echo<br>+<br>+TOOLLIST= \<br>+ cbmem \<br>+ ectool \<br>+ futility \<br>+ inteltool \<br>+ intelvbttool \<br>+ nvramtool \<br>+ superiotool \<br>+ viatool<br>+JENKINS_PAYLOAD?=none<br>+CPUS?=4<br>+what-jenkins-does:<br>+ util/lint/lint lint-stable --junit<br>+ util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml<br>+ util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)<br>+ (cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)<br>+ $(foreach tool, $(TOOLLIST), $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD="$(tool)" MFLAGS= MAKEFLAGS= MAKETARGET= junit.xml; )<br>+ unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=nvramcui MFLAGS= MAKEFLAGS= MAKETARGET=all junit.xml<br>+ unset COREBOOT_BUILD_DIR;$(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=payloads/ BLD=coreinfo MFLAGS= MAKEFLAGS= MAKETARGET=defaultbuild junit.xml<br>+ $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=util/ BLD=romcc MFLAGS= MAKEFLAGS= MAKETARGET=test junit.xml<br></pre><p>To view, visit <a href="https://review.coreboot.org/20873">change 20873</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20873"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie252c7555223f9ce76b54e6f7b66d03f3cf60500 </div>
<div style="display:none"> Gerrit-Change-Number: 20873 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>