aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-08-08 20:34:05 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-08-08 20:34:05 +0000
commit9a7b01615990401b893880780ec3e84ef31ec9ea (patch)
tree4735149406c8ca5022361e23e4fe0cbad73a5b7e
parent9afda630f5fbd74e17ff09ea3f1f3a359a9426b0 (diff)
downloadgcc-9a7b01615990401b893880780ec3e84ef31ec9ea.zip
gcc-9a7b01615990401b893880780ec3e84ef31ec9ea.tar.gz
gcc-9a7b01615990401b893880780ec3e84ef31ec9ea.tar.bz2
testsuite: fix gotest for absolute srcdir
The recent changes to Makefile.am mean that if you configure with an absolute path as srcdir then gotest will be invoked with absolute paths for the files. That case never worked. This patch fixes it. Reviewed-on: https://go-review.googlesource.com/25587 From-SVN: r239256
-rw-r--r--gcc/go/gofrontend/MERGE2
-rwxr-xr-xlibgo/testsuite/gotest66
2 files changed, 43 insertions, 25 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 6ec9f7b..3e8321a 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -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.
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 77722c2..5fc888b 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -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