This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Parallel testing of multilibs
On Jan 9, 2001, Richard Henderson <rth@redhat.com> wrote:
> On Tue, Jan 09, 2001 at 12:33:59PM -0200, Alexandre Oliva wrote:
>> +$(PAR_CHECK_TARGETS:=/%): site.exp
> Have you tried this with non-gnu make? Even if you're not
> trying to use the parallel test target you might cause other
> makes to barf on this construct.
Just tried it. No luck :-(
I ended up listing the targets explicitly. The revised patch, that
I'm about to check in, follows:
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (check-gcc//%, check-g++//%, check-g77//%,
check-objc//%): Support parallel testing of multilibs.
(TESTSUITEDIR): Set to testsuite by default, but override for
parallel testing.
(check-gcc, check-g++, check-g77, check-objc): Enter
$(TESTSUITEDIR).
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.578
diff -u -p -r1.578 Makefile.in
--- gcc/Makefile.in 2001/01/07 09:42:48 1.578
+++ gcc/Makefile.in 2001/01/11 03:36:03
@@ -2729,49 +2729,62 @@ CHECK_TARGETS = check-gcc check-g++ chec
check: $(CHECK_TARGETS)
-testsuite/site.exp: site.exp
- if [ -d testsuite ]; then \
- true; \
- else \
- mkdir testsuite; \
- fi
- rm -rf testsuite/site.exp
- cp site.exp testsuite/site.exp
+PAR_CHECK_TARGETS = $(CHECK_TARGETS:check-%=check/%)
-check-g++: testsuite/site.exp
+# The idea is to parallelize testing of multilibs, for example:
+# make -j3 check/gcc/sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
+# will run 3 concurrent sessions of check-gcc, eventually testing
+# all 10 combinations. GNU make is required, as is a shell that expands
+# alternations within braces.
+$(PAR_CHECK_TARGETS:=/%): site.exp
+ target=`echo "$@" | sed 's,/,-,;s,/.*,,'`; \
+ variant=`echo "$@" | sed 's,/,-,;s,^[^/]*/,,'`; \
+ vardots=`echo "$$variant" | sed 's,/,.,g'`; \
+ $(MAKE) TESTSUITEDIR="testsuite.$$vardots" \
+ RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
+ "$$target"
+
+TESTSUITEDIR = testsuite
+
+$(TESTSUITEDIR)/site.exp: site.exp
+ test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
+ -rm -f $@
+ sed '/set tmpdir/ s|testsuite|$(TESTSUITEDIR)|' < site.exp > $@
+
+check-g++: $(TESTSUITEDIR)/site.exp
-(rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- cd testsuite; \
+ cd $(TESTSUITEDIR); \
EXPECT=${EXPECT} ; export EXPECT ; \
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
export TCL_LIBRARY ; fi ; \
$(RUNTEST) --tool g++ $(RUNTESTFLAGS))
-check-gcc: testsuite/site.exp
+check-gcc: $(TESTSUITEDIR)/site.exp
-(rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- cd testsuite; \
+ cd $(TESTSUITEDIR); \
EXPECT=${EXPECT} ; export EXPECT ; \
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
export TCL_LIBRARY ; fi ; \
$(RUNTEST) --tool gcc $(RUNTESTFLAGS))
-check-g77: testsuite/site.exp
+check-g77: $(TESTSUITEDIR)/site.exp
-(rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- cd testsuite; \
+ cd $(TESTSUITEDIR); \
EXPECT=${EXPECT} ; export EXPECT ; \
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
export TCL_LIBRARY ; fi ; \
$(RUNTEST) --tool g77 $(RUNTESTFLAGS))
-check-objc: testsuite/site.exp
+check-objc: $(TESTSUITEDIR)/site.exp
-(rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- cd testsuite; \
+ cd $(TESTSUITEDIR); \
EXPECT=${EXPECT} ; export EXPECT ; \
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me