From patchwork Mon Jul 12 13:28:50 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: 58610 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 90C19B6EEE for ; Mon, 12 Jul 2010 23:29:07 +1000 (EST) Received: (qmail 5090 invoked by alias); 12 Jul 2010 13:29:04 -0000 Received: (qmail 5069 invoked by uid 22791); 12 Jul 2010 13:29:03 -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; Mon, 12 Jul 2010 13:28:58 +0000 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id o6CDStqN016091 for ; Mon, 12 Jul 2010 06:28:56 -0700 Received: from bwz14 (bwz14.prod.google.com [10.188.26.14]) by kpbe19.cbf.corp.google.com with ESMTP id o6CDScOI025607 for ; Mon, 12 Jul 2010 06:28:54 -0700 Received: by bwz14 with SMTP id 14so5129420bwz.11 for ; Mon, 12 Jul 2010 06:28:54 -0700 (PDT) Received: by 10.204.51.77 with SMTP id c13mr10746541bkg.98.1278941334227; Mon, 12 Jul 2010 06:28:54 -0700 (PDT) Received: from coign.google.com (dhcp-172-28-249-138.lul.corp.google.com [172.28.249.138]) by mx.google.com with ESMTPS id s17sm18542638bkx.6.2010.07.12.06.28.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Jul 2010 06:28:53 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: [gccgo] Testsuite adjustments for RTEMS Date: Mon, 12 Jul 2010 06:28:50 -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 adjusts the main Go testsuite so that it works correctly on RTEMS. It skips some tests that will not run on RTEMS, and xfails others that will not pass. It does not affect the behaviour on non-RTEMS systems. This is being done this way, rather than marking the tests, because the testsuite is copied unchanged from the other Go compiler. Committed to gccgo branch. Ian Index: gcc/testsuite/go.test/go-test.exp =================================================================== --- gcc/testsuite/go.test/go-test.exp (revision 161765) +++ gcc/testsuite/go.test/go-test.exp (working copy) @@ -67,6 +67,23 @@ set dg-do-what-default ${saved-dg-do-what-default} } +# This is an execution test which should fail. +proc go-execute-xfail { test } { + global DEFAULT_GOFLAGS + + set filename [file tail $test] + set fdin [open $test r] + set fdout [open $filename w] + puts $fdout "// { dg-do run { xfail *-*-* } }" + while { [gets $fdin copy_line] >= 0 } { + puts $fdout $copy_line + } + close $fdin + close $fdout + go-dg-runtest $filename "-w $DEFAULT_GOFLAGS" + file delete $filename +} + proc go-gc-tests { } { global srcdir subdir global runtests @@ -112,6 +129,31 @@ set name [dg-trim-dirname $srcdir $test] + # Skip certain tests if target is RTEMS OS. + if [istarget "*-*-rtems*"] { + if { [string match "*go.test/test/args.go" \ + $test] \ + || [string match "*go.test/test/env.go" \ + $test] } { + untested "$name: uses the command-line or environment variables" + continue + } + + if { [string match "*go.test/test/sigchld.go" \ + $test] \ + || [string match "*go.test/test/stack.go" \ + $test] \ + || [string match "*go.test/test/peano.go" \ + $test] \ + || [string match "*go.test/test/chan/goroutines.go" \ + $test] \ + || [string match "*go.test/test/chan/powser1.go" \ + $test] } { + untested "$name: has very high memory requirement" + continue + } + } + set fd [open $test r] if { [gets $fd test_line] < 0 } { close $fd @@ -193,6 +235,20 @@ || [string match \ "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out >* || echo BUG*" \ $test_line] } { + # XFAIL certain tests for RTEMS OS. + if [istarget "*-*-rtems*"] { + if { [string match "*go.test/test/ken/chan.go" \ + $test] \ + || [string match "*go.test/test/ken/modconst.go" \ + $test] \ + || [string match "*go.test/test/ken/divconst.go" \ + $test] \ + || [string match "*go.test/test/chan/powser2.go" \ + $test] } { + go-execute-xfail $test + continue + } + } # This is a vanilla execution test. go-torture-execute $test file delete core [glob -nocomplain core.*] @@ -233,18 +289,7 @@ $test_line] \ || ($test_line == "// \$G \$D/\$F.go && \$L \$F.\$A &&" && $test_line2 == "// ((! sh -c ./\$A.out) >/dev/null 2>&1 || echo BUG: should fail)") } { - # This is an execution test which should fail. - set filename [file tail $test] - set fdin [open $test r] - set fdout [open $filename w] - puts $fdout "// { dg-do run { xfail *-*-* } }" - while { [gets $fdin copy_line] >= 0 } { - puts $fdout $copy_line - } - close $fdin - close $fdout - go-dg-runtest $filename "-w $DEFAULT_GOFLAGS" - file delete $filename + go-execute-xfail $test } elseif { [string match "// errchk \$G \$F.go" $test_line] \ || [string match "// errchk \$G -e \$F.go" $test_line] \ || [string match "// errchk \$G \$D/\$F.go" $test_line] \