summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-03 18:26:57 +0000
committerAndrew Pinski <apinski@cavium.com>2012-04-11 14:51:23 -0700
commit26390ae12e339b4b93d24e8b81a0e789bf562a6b (patch)
treefd601a5868c0d7348e89fb0ae7dd7969b8a53753
parent88808676d13b1f8dc2fb9cfbad948a964665196f (diff)
downloadgcc-26390ae12e339b4b93d24e8b81a0e789bf562a6b.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
-rw-r--r--libgo/Makefile.am4
-rw-r--r--libgo/Makefile.in4
-rwxr-xr-xlibgo/testsuite/gotest17
3 files changed, 20 insertions, 5 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 14f72ecdc7d..11a650be689 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1808,9 +1808,9 @@ CHECK = \
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
test "$${prefix}" != "." || prefix="$(@D)"; \
if test "$(use_dejagnu)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \
+ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 720d57e04f0..f790205bed4 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -2045,9 +2045,9 @@ CHECK = \
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
test "$${prefix}" != "." || prefix="$(@D)"; \
if test "$(use_dejagnu)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS); \
+ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
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