]> Cypherpunks repositories - gostls13.git/commitdiff
do not import testing twice when testing testing.
authorRuss Cox <rsc@golang.org>
Wed, 7 Oct 2009 21:52:44 +0000 (14:52 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 7 Oct 2009 21:52:44 +0000 (14:52 -0700)
R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=35443
CL=35445

src/cmd/gotest/gotest

index c4c8e1a9e05cdc2381f6cd6f81eca75742548ae8..212abbf755106598fcd68e62e459d1c4cc894eac 100755 (executable)
@@ -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_"'