aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-31 18:21:47 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-31 18:21:47 +0000
commit2ce0fcf8c53871efa8e4e163cdf891e0c43b7cd9 (patch)
tree4e2f119b8dcf60e7abf39c96a023e7f05d920f79 /libgo
parent67e6b2377293283e8847f5a68a8532b0a1971ecc (diff)
gotest: accept symbols with leading dot
On AIX nm displays symbols with a leading dot; don't discard such symbols. While we're here stop doing fgrep -v '$', symbol names no longer contain '$' anyhow. Reviewed-on: https://go-review.googlesource.com/91095 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rwxr-xr-xlibgo/testsuite/gotest6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 1b23b6d0fc7..f5c908adef8 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -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'