From patchwork Thu Mar 31 23:03:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 89149 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C8BA1B6F85 for ; Fri, 1 Apr 2011 10:03:37 +1100 (EST) Received: (qmail 17679 invoked by alias); 31 Mar 2011 23:03:34 -0000 Received: (qmail 17663 invoked by uid 22791); 31 Mar 2011 23:03:32 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 23:03:28 +0000 Received: from hpaq6.eem.corp.google.com (hpaq6.eem.corp.google.com [172.25.149.6]) by smtp-out.google.com with ESMTP id p2VN3Qef006545 for ; Thu, 31 Mar 2011 16:03:27 -0700 Received: from yia28 (yia28.prod.google.com [10.243.65.28]) by hpaq6.eem.corp.google.com with ESMTP id p2VN37Lh002242 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 31 Mar 2011 16:03:25 -0700 Received: by yia28 with SMTP id 28so1734806yia.21 for ; Thu, 31 Mar 2011 16:03:25 -0700 (PDT) Received: by 10.151.117.12 with SMTP id u12mr3473057ybm.142.1301612605254; Thu, 31 Mar 2011 16:03:25 -0700 (PDT) Received: from coign.google.com (dhcp-172-22-127-165.mtv.corp.google.com [172.22.127.165]) by mx.google.com with ESMTPS id o2sm54008ybn.21.2011.03.31.16.03.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 Mar 2011 16:03:24 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Set name of test when using DejaGNU Date: Thu, 31 Mar 2011 16:03:22 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This libgo patch sets the name of the test correctly when using DejaGNU to run the libgo testsuite. Bootstrapped and ran libgo testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 66deaac7efb2 libgo/Makefile.am --- a/libgo/Makefile.am Thu Mar 31 15:34:36 2011 -0700 +++ b/libgo/Makefile.am Thu Mar 31 15:58:43 2011 -0700 @@ -1551,7 +1551,7 @@ prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \ test "$${prefix}" != "." || prefix="$(@D)"; \ if test "$(use_dejagnu)" = "yes"; then \ - $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS); \ + $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \ else \ if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \ echo "PASS: $(@D)"; \ diff -r 66deaac7efb2 libgo/testsuite/gotest --- a/libgo/testsuite/gotest Thu Mar 31 15:34:36 2011 -0700 +++ b/libgo/testsuite/gotest Thu Mar 31 15:58:43 2011 -0700 @@ -33,6 +33,7 @@ prefix= dejagnu=no timeout=60 +testname="" while $loop; do case "x$1" in x--srcdir) @@ -93,6 +94,15 @@ timeout=`echo $1 | sed -e 's/^--timeout=//'` shift ;; + x--testname) + testname=$2 + shift + shift + ;; + x--testname=*) + testname=`echo $1 | sed -e 's/^--testname=//'` + shift + ;; x-*) loop=false ;; @@ -386,6 +396,10 @@ cd ../testsuite rm -rf _obj _test mkdir _obj _test + if test "$testname" != ""; then + GOTESTNAME="$testname" + export GOTESTNAME + fi $MAKE check RUNTESTFLAGS="$RUNTESTFLAGS GOTEST_TMPDIR=$DIR" # Useful when using make check-target-libgo cat libgo.log >> libgo-all.log diff -r 66deaac7efb2 libgo/testsuite/libgo.testmain/testmain.exp --- a/libgo/testsuite/libgo.testmain/testmain.exp Thu Mar 31 15:34:36 2011 -0700 +++ b/libgo/testsuite/libgo.testmain/testmain.exp Thu Mar 31 15:58:43 2011 -0700 @@ -57,4 +57,10 @@ set result [libgo_load "./a.exe" "-test.short" ""] set status [lindex $result 0] -$status go + +set name "go" +if [info exists env(GOTESTNAME)] { + set name "$env(GOTESTNAME)" +} + +$status $name