summaryrefslogtreecommitdiff
path: root/src/cmd/gotest
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-11-12 14:28:45 -0800
committerRob Pike <r@golang.org>2009-11-12 14:28:45 -0800
commit0ea274120c40678b663de3d8e6d45befb21dbbcd (patch)
treeb1c07dcf848953f0c079df2063e398258ef3b43f /src/cmd/gotest
parent5179a2c679d37f7d4bb64d21ebf086a9e7d03731 (diff)
downloadgolang-0ea274120c40678b663de3d8e6d45befb21dbbcd.tar.gz
produce helpful error when gotest doesn't find a Makefile
Fixes issue 117. R=rsc, agl1 CC=golang-dev http://codereview.appspot.com/152107
Diffstat (limited to 'src/cmd/gotest')
-rwxr-xr-xsrc/cmd/gotest/gotest9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest
index 8d43cb7dc..b43fe4d28 100755
--- a/src/cmd/gotest/gotest
+++ b/src/cmd/gotest/gotest
@@ -16,10 +16,15 @@ export LC_CTYPE=C
_GC=$GC # Make.$GOARCH will overwrite this
+if [ ! -f [Mm]akefile ]; then
+ echo 'please create a Makefile for gotest; see http://golang.org/doc/contribute.html (sic) for details' 1>&2
+ exit 2
+fi
+
. $GOROOT/src/Make.$GOARCH
if [ -z "$O" ]; then
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
- exit 1
+ exit 2
fi
E=""
@@ -66,7 +71,7 @@ esac
case "x$gofiles" in
x)
echo 'no test files found' 1>&2
- exit 1
+ exit 2
esac
# Run any commands given in sources, like