summaryrefslogtreecommitdiff
path: root/src/cmd/gotest
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-07 14:52:44 -0700
committerRuss Cox <rsc@golang.org>2009-10-07 14:52:44 -0700
commitc347fdc13f125e304e5fa1ab24bed22362ebd4c5 (patch)
tree3147854cc72eeff055aba2e0d4542660a01776d0 /src/cmd/gotest
parent2b77e59eaed6d039951b5ef7ad1f3db421962dc2 (diff)
downloadgolang-c347fdc13f125e304e5fa1ab24bed22362ebd4c5.tar.gz
do not import testing twice when testing testing.
R=r DELTA=3 (2 added, 0 deleted, 1 changed) OCL=35443 CL=35445
Diffstat (limited to 'src/cmd/gotest')
-rwxr-xr-xsrc/cmd/gotest/gotest4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest
index c4c8e1a9e..212abbf75 100755
--- a/src/cmd/gotest/gotest
+++ b/src/cmd/gotest/gotest
@@ -107,7 +107,9 @@ importpath=$(make -s importpath)
echo
# imports
if echo "$tests" | egrep -v '_test\.' >/dev/null; then
- echo 'import "'$importpath'"'
+ if [ "$importpath" != "testing" ]; then
+ echo 'import "'$importpath'"'
+ fi
fi
if $havex; then
echo 'import "./_xtest_"'