diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-31 18:21:47 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-31 18:21:47 +0000 |
commit | 382ce98374d2625d0f5cab3c7cb578aee7a5889c (patch) | |
tree | 4e2f119b8dcf60e7abf39c96a023e7f05d920f79 /libgo/testsuite | |
parent | be197ade2e5fb42606339080b08e885824fb9644 (diff) | |
download | gcc-382ce98374d2625d0f5cab3c7cb578aee7a5889c.zip gcc-382ce98374d2625d0f5cab3c7cb578aee7a5889c.tar.gz gcc-382ce98374d2625d0f5cab3c7cb578aee7a5889c.tar.bz2 |
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
From-SVN: r257247
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-x | libgo/testsuite/gotest | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 1b23b6d..f5c908ad 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' |