From patchwork Thu Aug 26 00:01:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 62745 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 52DA9B70D9 for ; Thu, 26 Aug 2010 10:01:46 +1000 (EST) Received: (qmail 6475 invoked by alias); 26 Aug 2010 00:01:43 -0000 Received: (qmail 6250 invoked by uid 22791); 26 Aug 2010 00:01:43 -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, TW_CC, 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, 26 Aug 2010 00:01:38 +0000 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id o7Q01aUR015182 for ; Wed, 25 Aug 2010 17:01:36 -0700 Received: from pxi4 (pxi4.prod.google.com [10.243.27.4]) by wpaz1.hot.corp.google.com with ESMTP id o7Q01YYF025686 for ; Wed, 25 Aug 2010 17:01:35 -0700 Received: by pxi4 with SMTP id 4so488710pxi.36 for ; Wed, 25 Aug 2010 17:01:34 -0700 (PDT) Received: by 10.142.204.17 with SMTP id b17mr7627549wfg.71.1282780894691; Wed, 25 Aug 2010 17:01:34 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id k23sm1028599wfa.17.2010.08.25.17.01.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Aug 2010 17:01:33 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: [gccgo] Fix DejaGNU libgo testsuite Date: Wed, 25 Aug 2010 17:01:28 -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 patch from Vinu Rajashekhar fixes the DejaGNU testsuite he introduced for RTEMS testing. Committed to gccgo branch. Ian Index: libgo/testsuite/libgo.testmain/testmain.exp =================================================================== --- libgo/testsuite/libgo.testmain/testmain.exp (revision 163203) +++ libgo/testsuite/libgo.testmain/testmain.exp (working copy) @@ -22,11 +22,15 @@ lappend ld_options "ldflags=-lgotesting" if [istarget "*-*-rtems*"] { global options + verbose -log "Executing on host: tar cf FilesystemImage -h -C \ + $tool_root_dir/$tool/${GOTEST_TMPDIR} ." if [catch "exec tar cf FilesystemImage -h -C \ $tool_root_dir/$tool/${GOTEST_TMPDIR} ." error] { perror "Error during tar of local filesystem: $error" exit 1 } + + verbose -log "Executing on host: ${RTEMS_BIN2C} FilesystemImage FilesystemImage" if [catch "exec ${RTEMS_BIN2C} FilesystemImage FilesystemImage" error] { perror "Error when creating FilesystemImage source file: $error" exit 1 @@ -50,5 +54,5 @@ if ![ string match "" $comp_output ] { verbose -log $comp_output exit 1 } -verbose -log $comp_output + libgo_load "./a.exe" "" "" Index: libgo/testsuite/lib/libgo.exp =================================================================== --- libgo/testsuite/lib/libgo.exp (revision 163203) +++ libgo/testsuite/lib/libgo.exp (working copy) @@ -14,6 +14,13 @@ # along with GCC; see the file COPYING3. If not see # . +set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] +if {$gccdir != ""} { + set gccdir [file dirname $gccdir] +} +set GO_UNDER_TEST "$gccdir/gccgo -B$gccdir/" +set TESTING_IN_BUILD_TREE 1 + proc go_maybe_build_wrapper { args } { libgo_maybe_build_wrapper $args } @@ -34,8 +41,6 @@ load_gcc_lib wrapper.exp load_gcc_lib gcc-defs.exp load_gcc_lib go.exp -set TESTING_IN_BUILD_TREE 1 - proc libgo_init { args } { go_init $args } Index: libgo/testsuite/Makefile.am =================================================================== --- libgo/testsuite/Makefile.am (revision 163203) +++ libgo/testsuite/Makefile.am (working copy) @@ -11,6 +11,11 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja echo $(top_srcdir)/../dejagnu/runtest ; \ else echo runtest; fi` -AM_RUNTESTFLAGS = +# When running the tests we set GCC_EXEC_PREFIX to the install tree so that +# files that have already been installed there will be found. The -B option +# overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files +# from the install tree. + +AM_RUNTESTFLAGS = "TEST_GCC_EXEC_PREFIX=$(libdir)/gcc" CLEANFILES = *.log *.sum