mirror of git://gcc.gnu.org/git/gcc.git
gotest: Don't get confused by data tables named Test on PPC.
From-SVN: r186605
This commit is contained in:
parent
f7613be56a
commit
8198dc134f
|
@ -347,18 +347,18 @@ localname() {
|
||||||
pattern='Test([^a-z].*)?'
|
pattern='Test([^a-z].*)?'
|
||||||
# The -p option tells GNU nm not to sort.
|
# The -p option tells GNU nm not to sort.
|
||||||
# The -v option tells Solaris nm to sort by value.
|
# The -v option tells Solaris nm to sort by value.
|
||||||
tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
||||||
if [ "x$tests" = x ]; then
|
if [ "x$tests" = x ]; then
|
||||||
echo 'gotest: warning: no tests matching '$pattern in _gotest_.o $xofile 1>&2
|
echo 'gotest: warning: no tests matching '$pattern in _gotest_.o $xofile 1>&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
# benchmarks are named BenchmarkFoo.
|
# benchmarks are named BenchmarkFoo.
|
||||||
pattern='Benchmark([^a-z].*)?'
|
pattern='Benchmark([^a-z].*)?'
|
||||||
benchmarks=$($NM -p -v _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $test .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
||||||
|
|
||||||
# examples are named ExampleFoo
|
# examples are named ExampleFoo
|
||||||
pattern='Example([^a-z].*)?'
|
pattern='Example([^a-z].*)?'
|
||||||
examples=$($NM -p -v _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
examples=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
|
||||||
|
|
||||||
# package spec
|
# package spec
|
||||||
echo 'package main'
|
echo 'package main'
|
||||||
|
|
Loading…
Reference in New Issue