From patchwork Sat Jul 3 00:22:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [gccgo] Minor testsuite harness fixes From: Ian Taylor X-Patchwork-Id: 57789 Message-Id: To: gcc-patches@gcc.gnu.org Date: Fri, 02 Jul 2010 17:22:37 -0700 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 \