github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/scripts/checktesting.bash (about) 1 #!/bin/bash 2 exitstatus=0 3 for i in $(go list -f '{{.Dir}}' github.com/juju/juju/...) 4 do 5 src=$i/*_test.go 6 # The -s flag is needed to suppress errors when 7 # the above pattern does not match any files. 8 if grep -s -q -l 'gopkg.in/check.v1' $src && 9 ! egrep -l -q 'gc\.TestingT|testing\.(\w*)MgoTestPackage' $src 10 then 11 # There are _test.go files that use gocheck but 12 # don't call gocheck.TestingT. 13 echo $i uses gocheck but never calls TestingT 14 exitstatus=1 15 fi 16 done 17 exit $exitstatus