From 10f92c9c3f007bbb1a41d5a9733a6d470db9bf43 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 2 Feb 2013 15:40:14 +0000 Subject: re PR go/56171 (syscall FAILs on Solaris) PR go/56171 syscall: Only run creds_test on GNU/Linux. From-SVN: r195686 --- libgo/Makefile.am | 15 +++++++++++++-- libgo/Makefile.in | 12 ++++++++++-- libgo/testsuite/gotest | 9 +++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) (limited to 'libgo') diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 8a54d9e..f68443c 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -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; \ diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 88c09a4..0f92aca 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -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; \ diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index bbe77cc..4015ed1 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -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 -- cgit v1.1