re PR go/56017 (libgo testsuite does not support cross testing)

PR go/56017
libgo: Use DejaGNU when testing a cross-compiler.

From-SVN: r195766
This commit is contained in:
Ian Lance Taylor 2013-02-05 22:22:17 +00:00
parent 31502f9f1f
commit 7134cf2833
5 changed files with 26 additions and 12 deletions

View File

@ -1991,12 +1991,6 @@ BUILDPACKAGE = \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
$(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
if LIBGO_IS_RTEMS
use_dejagnu = yes
else
use_dejagnu = no
endif
GOTESTFLAGS =
# Check a package.
@ -2015,7 +2009,7 @@ CHECK = \
export LD_LIBRARY_PATH; \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
if test "$(use_dejagnu)" = "yes"; then \
if test "$(USE_DEJAGNU)" = "yes"; then \
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \

View File

@ -359,6 +359,7 @@ SPLIT_STACK = @SPLIT_STACK@
STRINGOPS_FLAG = @STRINGOPS_FLAG@
STRIP = @STRIP@
STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@
USE_DEJAGNU = @USE_DEJAGNU@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
@ -2107,8 +2108,6 @@ BUILDPACKAGE = \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
$(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
@LIBGO_IS_RTEMS_FALSE@use_dejagnu = no
@LIBGO_IS_RTEMS_TRUE@use_dejagnu = yes
GOTESTFLAGS =
# Check a package.
@ -2127,7 +2126,7 @@ CHECK = \
export LD_LIBRARY_PATH; \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
if test "$(use_dejagnu)" = "yes"; then \
if test "$(USE_DEJAGNU)" = "yes"; then \
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
else \
if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \

13
libgo/configure vendored
View File

@ -653,6 +653,7 @@ LIBGO_IS_ALPHA_FALSE
LIBGO_IS_ALPHA_TRUE
LIBGO_IS_386_FALSE
LIBGO_IS_386_TRUE
USE_DEJAGNU
GOOS
LIBGO_IS_SOLARIS_FALSE
LIBGO_IS_SOLARIS_TRUE
@ -11104,7 +11105,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11107 "configure"
#line 11108 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11210,7 +11211,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11213 "configure"
#line 11214 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13562,6 +13563,14 @@ fi
USE_DEJAGNU=no
case ${host} in
*-*-rtems*) USE_DEJAGNU=yes ;;
${target}) ;;
*) USE_DEJAGNU=yes ;;
esac
is_386=no
is_alpha=no
is_arm=no

View File

@ -156,6 +156,17 @@ AM_CONDITIONAL(LIBGO_IS_RTEMS, test $is_rtems = yes)
AM_CONDITIONAL(LIBGO_IS_SOLARIS, test $is_solaris = yes)
AC_SUBST(GOOS)
dnl Test whether we need to use DejaGNU or whether we can use the
dnl simpler gotest approach. We can only use gotest for a native
dnl build.
USE_DEJAGNU=no
case ${host} in
*-*-rtems*) USE_DEJAGNU=yes ;;
${target}) ;;
*) USE_DEJAGNU=yes ;;
esac
AC_SUBST(USE_DEJAGNU)
dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
is_386=no
is_alpha=no

View File

@ -137,6 +137,7 @@ SPLIT_STACK = @SPLIT_STACK@
STRINGOPS_FLAG = @STRINGOPS_FLAG@
STRIP = @STRIP@
STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@
USE_DEJAGNU = @USE_DEJAGNU@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@