From patchwork Sat Jul 3 00:22:37 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: 57789 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 8F4241007D2 for ; Sat, 3 Jul 2010 10:23:13 +1000 (EST) Received: (qmail 17396 invoked by alias); 3 Jul 2010 00:23:11 -0000 Received: (qmail 17387 invoked by uid 22791); 3 Jul 2010 00:23:11 -0000 X-SWARE-Spam-Status: No, hits=-2.1 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) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 03 Jul 2010 00:23:06 +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 o630N3CE006137 for ; Fri, 2 Jul 2010 17:23:03 -0700 Received: from pxi8 (pxi8.prod.google.com [10.243.27.8]) by wpaz1.hot.corp.google.com with ESMTP id o630N28r025612 for ; Fri, 2 Jul 2010 17:23:02 -0700 Received: by pxi8 with SMTP id 8so83184pxi.37 for ; Fri, 02 Jul 2010 17:23:02 -0700 (PDT) Received: by 10.114.131.2 with SMTP id e2mr1890331wad.43.1278116581962; Fri, 02 Jul 2010 17:23:01 -0700 (PDT) Received: from coign.google.com ([67.218.107.123]) by mx.google.com with ESMTPS id n32sm18627236wag.23.2010.07.02.17.22.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Jul 2010 17:23:00 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: [gccgo] Minor testsuite harness fixes Date: Fri, 02 Jul 2010 17:22:37 -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 a couple of minor issues in the gccgo testsuite harness in order to make it work better on RTEMS. There is no longer any need to cd into the directory before running the test. Programs should be run via go_load rather than exec. Committed to gccgo branch. Ian Index: gcc/testsuite/go.test/go-test.exp =================================================================== --- gcc/testsuite/go.test/go-test.exp (revision 161655) +++ gcc/testsuite/go.test/go-test.exp (working copy) @@ -194,10 +194,8 @@ "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out >* || echo BUG*" \ $test_line] } { # This is a vanilla execution test. - cd [file dirname $test] go-torture-execute $test file delete core [glob -nocomplain core.*] - cd $testdir } elseif { [string match \ "// \$G \$D/\$F.go && \$L \$F.\$A || echo BUG*" \ $test_line] \ @@ -351,11 +349,9 @@ $output_file "executable" "$DEFAULT_GOFLAGS"] set comp_output [go-dg-prune $target_triplet $comp_output] verbose -log $comp_output - if { [catch "exec $output_file" ] != 0 } { - fail $name - } else { - pass $name - } + set result [go_load "$output_file" "" ""] + set status [lindex $result 0] + $status $name file delete $ofile1 $ofile2 $output_file set runtests $hold_runtests } elseif { [string match \