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