This libgo patch changes the gotest script to accept symbols with a
leading dot, as found on AIX.  While we're here stop doing fgrep -v
'$', symbol names no longer contain '$' anyhow.  Bootstrapped and ran
Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 257235)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-973ae0a30c17e736f57377fa32371719b9ebccf6
+00f87806635655339dbbca59e6ae2ea8231cf9b1
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest      (revision 257217)
+++ libgo/testsuite/gotest      (working copy)
@@ -518,18 +518,18 @@ localname() {
        pattern='Test([^a-z].*)?'
        # The -p option tells GNU nm not to sort.
        # The -v option tells Solaris nm to sort by value.
-       tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | 
grep -v '\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo)
+       tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | 
grep -v '[^ ]\..*\.' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo)
        if [ "x$tests" = x ]; then
                echo 'gotest: warning: no tests matching '$pattern in 
_gotest_.o $xofile 1>&2
                exit 2
        fi
        # benchmarks are named BenchmarkFoo.
        pattern='Benchmark([^a-z].*)?'
-       benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $text 
.*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | 
sed 's/.* //' | $symtogo)
+       benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $text 
.*\."$pattern'$' | grep -v '[^ ]\..*\.' | fgrep -v ' __go_' | sed 's/.* //' | 
$symtogo)
 
        # examples are named ExampleFoo
        pattern='Example([^a-z].*)?'
-       examples=$($NM -p -v _gotest_.o $xofile | egrep " $text 
.*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | 
sed 's/.* //' | $symtogo)
+       examples=$($NM -p -v _gotest_.o $xofile | egrep " $text 
.*\."$pattern'$' | grep -v '[^ ]\..*\.' | fgrep -v ' __go_' | sed 's/.* //' | 
$symtogo)
 
        # package spec
        echo 'package main'

Reply via email to