This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libgo patch committed: Fix testsuite for PPC
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 19 Apr 2012 21:49:38 -0700
- Subject: libgo patch committed: Fix testsuite for PPC
The change to the libgo testsuite script to look at data symbols for
function descriptors on PowerPC caused the script to pick up interface
method tables and the like for types named Test*. This patch adds a
grep -v to trim those out again. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu. Committed to
mainline and 4.7 branch.
Ian
diff -r 2ba470ed797c libgo/testsuite/gotest
--- a/libgo/testsuite/gotest Mon Apr 16 16:03:29 2012 -0700
+++ b/libgo/testsuite/gotest Thu Apr 19 21:44:55 2012 -0700
@@ -347,18 +347,18 @@
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 '$' | 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
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 ' 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
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
echo 'package main'