From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18945 invoked by alias); 3 Jun 2004 11:22:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18912 invoked from network); 3 Jun 2004 11:22:30 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 3 Jun 2004 11:22:30 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i53BMUi5029481 for ; Thu, 3 Jun 2004 07:22:30 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i53BMU025159; Thu, 3 Jun 2004 07:22:30 -0400 Received: from livre.redhat.lsd.ic.unicamp.br (vpn64-18.boston.redhat.com [172.16.66.18]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i53BMSGA006365; Thu, 3 Jun 2004 07:22:29 -0400 Received: from livre.redhat.lsd.ic.unicamp.br (livre.redhat.lsd.ic.unicamp.br [127.0.0.1]) by livre.redhat.lsd.ic.unicamp.br (8.12.11/8.12.11) with ESMTP id i53BMQHJ014586; Thu, 3 Jun 2004 08:22:26 -0300 Received: (from aoliva@localhost) by livre.redhat.lsd.ic.unicamp.br (8.12.11/8.12.11/Submit) id i53BMPRY014579; Thu, 3 Jun 2004 08:22:25 -0300 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: add check// targets to gdb References: <20040603031730.GB920@nevyn.them.org> From: Alexandre Oliva Organization: Red Hat Global Engineering Services Compiler Team Date: Thu, 03 Jun 2004 11:22:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2004-06/txt/msg00049.txt.bz2 --=-=-= Content-length: 253 On Jun 3, 2004, Alexandre Oliva wrote: > BTW, I just found out the patch didn't quite work. There are some > sub-subdirectories of testsuite that have to be configured as well. > I'll post an update later. Here's a fixed patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gdb-check-parallel.patch Content-length: 1893 Index: gdb/ChangeLog from Alexandre Oliva * Makefile.in (check//%): New. Index: gdb/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.581 diff -u -p -r1.581 Makefile.in --- gdb/Makefile.in 26 May 2004 05:31:39 -0000 1.581 +++ gdb/Makefile.in 3 Jun 2004 11:21:20 -0000 @@ -956,6 +956,34 @@ check: force $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ else true; fi +# The idea is to parallelize testing of multilibs, for example: +# make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu} +# will run 3 concurrent sessions of check, eventually testing all 10 +# combinations. GNU make is required for the % pattern to work, as is +# a shell that expands alternations within braces. If GNU make is not +# used, this rule will harmlessly fail to match. +check//%: force + @if [ -f testsuite/config.status ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + target=`echo "$@" | sed 's,//.*,,'`; \ + variant=`echo "$@" | sed 's,^[^/]*//,,'`; \ + vardots=`echo "$$variant" | sed 's,/,.,g'`; \ + testdir=testsuite.$$vardots; \ + if [ ! -f $$testdir/Makefile ]; then \ + (cd testsuite && find . -name config.status) | \ + sed s,/config.status$$,, | sort | while read subdir; do \ + $(SHELL) $(srcdir)/../mkinstalldirs $$testdir/$$subdir && \ + (cd $$testdir/$$subdir && \ + $(SHELL) $$rootme/testsuite/$$subdir/config.status \ + --recheck && \ + $(SHELL) ./config.status); done; \ + else :; fi && cd $$testdir && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) \ + RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \ + "$$target"; \ + else true; fi + info dvi install-info clean-info html install-html: force @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do --=-=-= Content-length: 188 -- Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org} --=-=-=--