summaryrefslogtreecommitdiff
path: root/libgo/testsuite
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-03 18:26:57 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-03 18:26:57 +0000
commiteea53b8e3ec767f0fbb795975b486811f4bf91f6 (patch)
tree15acfff0fb36b790c36320bbec36c7bca0b9df08 /libgo/testsuite
parent3cef948a814542119083003a3c35a24e036230b6 (diff)
downloadgcc-eea53b8e3ec767f0fbb795975b486811f4bf91f6.tar.gz
gotest: Fix finding functions on PPC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186112 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-xlibgo/testsuite/gotest17
1 files changed, 16 insertions, 1 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 3511c52a071..aac67bfbcfb 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -32,6 +32,7 @@ loop=true
keep=false
prefix=
dejagnu=no
+GOARCH=""
timeout=240
testname=""
trace=false
@@ -86,6 +87,15 @@ while $loop; do
dejagnu=`echo $1 | sed -e 's/^--dejagnu=//'`
shift
;;
+ x--goarch)
+ GOARCH=$2
+ shift
+ shift
+ ;;
+ x--goarch=*)
+ GOARCH=`echo $1 | sed -e 's/^--goarch=//'`
+ shift
+ ;;
x--timeout)
timeout=$2
shift
@@ -326,13 +336,18 @@ localname() {
}
{
+ text="T"
+ case "$GOARCH" in
+ ppc*) text="D" ;;
+ esac
+
# test functions are named TestFoo
# the grep -v eliminates methods and other special names
# that have multiple dots.
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 ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
+ tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | 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