re PR go/56171 (syscall FAILs on Solaris)

PR go/56171
syscall: Only run creds_test on GNU/Linux.

From-SVN: r195686
This commit is contained in:
Ian Lance Taylor 2013-02-02 15:40:14 +00:00
parent 7ebe663e98
commit 10f92c9c3f
3 changed files with 32 additions and 4 deletions

View File

@ -1696,6 +1696,13 @@ else
syscall_utimesnano_file = go/syscall/libcall_posix_utimesnano.go
endif
# Test files.
if LIBGO_IS_LINUX
syscall_creds_test_file = go/syscall/creds_test.go
else
syscall_creds_test_file =
endif
go_base_syscall_files = \
go/syscall/env_unix.go \
go/syscall/syscall_errno.go \
@ -1734,6 +1741,10 @@ go_syscall_c_files = \
go/syscall/signame.c \
$(syscall_wait_c_file)
go_syscall_test_files = \
$(syscall_creds_test_file) \
go/syscall/passfd_test.go
libcalls.go: s-libcalls; @true
s-libcalls: Makefile go/syscall/mksyscall.awk $(go_base_syscall_files)
rm -f libcalls.go.tmp
@ -2005,9 +2016,9 @@ CHECK = \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
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); \
$(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) >>$@-testlog 2>&1; then \
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 \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \

View File

@ -1870,6 +1870,10 @@ go_unicode_utf8_files = \
# GNU/Linux specific utimesnano support.
@LIBGO_IS_LINUX_TRUE@syscall_utimesnano_file = go/syscall/libcall_linux_utimesnano.go
@LIBGO_IS_LINUX_FALSE@syscall_creds_test_file =
# Test files.
@LIBGO_IS_LINUX_TRUE@syscall_creds_test_file = go/syscall/creds_test.go
go_base_syscall_files = \
go/syscall/env_unix.go \
go/syscall/syscall_errno.go \
@ -1909,6 +1913,10 @@ go_syscall_c_files = \
go/syscall/signame.c \
$(syscall_wait_c_file)
go_syscall_test_files = \
$(syscall_creds_test_file) \
go/syscall/passfd_test.go
@LIBGO_IS_LINUX_FALSE@os_lib_inotify_lo =
# os_lib_inotify_lo = os/inotify.lo
@ -2120,9 +2128,9 @@ CHECK = \
$(MKDIR_P) $(@D); \
rm -f $@-testsum $@-testlog; \
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); \
$(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) >>$@-testlog 2>&1; then \
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 \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \

View File

@ -259,12 +259,20 @@ mkdir _test
case "x$gofiles" in
x)
gofiles=`ls *_test.go 2>/dev/null`
;;
*)
xgofiles=$gofiles
gofiles=
for f in $xgofiles; do
gofiles="$gofiles `basename $f`"
done
esac
case "x$gofiles" in
x)
echo 'no test files found' 1>&2
exit 1
;;
esac
# Run any commands given in sources, like
@ -295,6 +303,7 @@ esac
# Split $gofiles into external gofiles (those in *_test packages)
# and internal ones (those in the main package).
xgofiles=
for f in $gofiles; do
package=`grep '^package[ ]' $f | sed 1q`
case "$package" in