On Mon, Aug 8, 2016 at 11:14 AM, Lynn A. Boger
<labo...@linux.vnet.ibm.com> wrote:
> The libgo tests on ppc64le and ppc64 have all been failing in
> gcc-testresults since this change went in and continues to fail after the
> recent fixes for failures on other platforms.
>
> Built myself and got the same failures.  I set keep=true in gotest to save
> the test dirs.  Just running a single package:
>
> make bufio/check
> file /home/boger/gccgo.work/trunk/bld/../src/libgo/go/bufio/bufio.go not
> found
> Keeping gotest9734
> FAIL: bufio
> Makefile:3645: recipe for target 'bufio/check' failed
> make: *** [bufio/check] Error 1
> boger@willow3:~/gccgo.work/trunk/bld/powerpc64le-linux/libgo$ ls
> /home/boger/gccgo.work/trunk/bld/../src/libgo/go/bufio/bufio.go
> /home/boger/gccgo.work/trunk/bld/../src/libgo/go/bufio/bufio.go
> boger@willow3:~/gccgo.work/trunk/bld/powerpc64le-linux/libgo$ file
> /home/boger/gccgo.work/trunk/bld/../src/libgo/go/bufio/bufio.go
> /home/boger/gccgo.work/trunk/bld/../src/libgo/go/bufio/bufio.go: ASCII text

I found the problem.  I always configure with a relative srcdir.  You
are using an absolute srcdir.  The recent changes to use build tags
changed the libgo Makefile so that when invoked with with an absolute
srcdir it would pass absolute path names to the gotest script.  That
never worked.  This patch makes it work, and should fix your problem.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu with a
relative srcdir and an absolute srcdir.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 239252)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-5e4c16d4fea39835e16f17c3d2b2e85f5c81d815
+2c88d4871558f0451a0ad152a7052dcfaecb254f
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest      (revision 239225)
+++ libgo/testsuite/gotest      (working copy)
@@ -217,18 +217,27 @@ x)
                ;;
        *)
                for f in $pkgfiles; do
-                   if test -f $basedir/$f; then
-                       b=`basename $f`
-                       rm -f $b
-                       cp $basedir/$f $b
-                   elif test -f ../../$f; then
-                       b=`basename $f`
-                       rm -f $b
-                       cp ../../$f $b
-                   else
-                       echo "file $f not found" 1>&2
-                       exit 1
-                   fi
+                    case $f in
+                    /*)
+                        b=`basename $f`
+                        rm -f $b
+                        cp $f $b
+                        ;;
+                    *)
+                       if test -f $basedir/$f; then
+                         b=`basename $f`
+                         rm -f $b
+                         cp $basedir/$f $b
+                       elif test -f ../../$f; then
+                         b=`basename $f`
+                         rm -f $b
+                         cp ../../$f $b
+                       else
+                         echo "file $f not found" 1>&2
+                         exit 1
+                       fi
+                        ;;
+                    esac
                done
                for f in `cd $srcdir; ls *_test.go`; do
                    rm -f $f
@@ -252,18 +261,27 @@ x)
                ;;
        *)
                for f in $pkgfiles; do
-                   if test -f $basedir/$f; then
-                       b=`basename $f`
-                       rm -f $b
-                       cp $basedir/$f $b
-                   elif test -f ../../$f; then
-                       b=`basename $f`
-                       rm -f $b
-                       cp ../../$f $b
-                   else
-                       echo "file $f not found" 1>&2
-                       exit 1
-                   fi
+                    case $f in
+                    /*)
+                        b=`basename $f`
+                        rm -f $b
+                        cp $f $b
+                        ;;
+                    *)
+                       if test -f $basedir/$f; then
+                         b=`basename $f`
+                         rm -f $b
+                         cp $basedir/$f $b
+                       elif test -f ../../$f; then
+                         b=`basename $f`
+                         rm -f $b
+                         cp ../../$f $b
+                       else
+                         echo "file $f not found" 1>&2
+                         exit 1
+                       fi
+                        ;;
+                    esac
                done
                ;;
        esac

Reply via email to