diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-02 15:40:14 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-02 15:40:14 +0000 |
commit | 185d8f6609a955138d7591527332ce8cb7fb3712 (patch) | |
tree | 0dc61810c5e7770c6081ce424c1d4adcad0421df /libgo | |
parent | 94d403603d74cffa8459beb7876de784d0914583 (diff) | |
download | gcc-185d8f6609a955138d7591527332ce8cb7fb3712.tar.gz |
PR go/56171
syscall: Only run creds_test on GNU/Linux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/Makefile.am | 15 | ||||
-rw-r--r-- | libgo/Makefile.in | 12 | ||||
-rwxr-xr-x | libgo/testsuite/gotest | 9 |
3 files changed, 32 insertions, 4 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 8a54d9eb43a..f68443cb5a2 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 88c09a4ee4f..0f92aca7309 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 bbe77cce09d..4015ed1e81e 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 |