Commit 9a7b0161 by Ian Lance Taylor

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
parent 9afda630
5e4c16d4fea39835e16f17c3d2b2e85f5c81d815 2c88d4871558f0451a0ad152a7052dcfaecb254f
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -217,18 +217,27 @@ x) ...@@ -217,18 +217,27 @@ x)
;; ;;
*) *)
for f in $pkgfiles; do for f in $pkgfiles; do
if test -f $basedir/$f; then case $f in
b=`basename $f` /*)
rm -f $b b=`basename $f`
cp $basedir/$f $b rm -f $b
elif test -f ../../$f; then cp $f $b
b=`basename $f` ;;
rm -f $b *)
cp ../../$f $b if test -f $basedir/$f; then
else b=`basename $f`
echo "file $f not found" 1>&2 rm -f $b
exit 1 cp $basedir/$f $b
fi 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 done
for f in `cd $srcdir; ls *_test.go`; do for f in `cd $srcdir; ls *_test.go`; do
rm -f $f rm -f $f
...@@ -252,18 +261,27 @@ x) ...@@ -252,18 +261,27 @@ x)
;; ;;
*) *)
for f in $pkgfiles; do for f in $pkgfiles; do
if test -f $basedir/$f; then case $f in
b=`basename $f` /*)
rm -f $b b=`basename $f`
cp $basedir/$f $b rm -f $b
elif test -f ../../$f; then cp $f $b
b=`basename $f` ;;
rm -f $b *)
cp ../../$f $b if test -f $basedir/$f; then
else b=`basename $f`
echo "file $f not found" 1>&2 rm -f $b
exit 1 cp $basedir/$f $b
fi 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 done
;; ;;
esac esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment