Lint shell scripts
This commit is contained in:
parent
2586542608
commit
e2d276f204
9 changed files with 71 additions and 72 deletions
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if ! [ -z $DEBUG ]; then
|
||||
if [ -n "$DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
|
|
@ -23,17 +23,17 @@ set -o nounset
|
|||
set -o pipefail
|
||||
|
||||
if [ -z "${PKG}" ]; then
|
||||
echo "PKG must be set"
|
||||
exit 1
|
||||
echo "PKG must be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf coverage.txt
|
||||
for d in `go list ${PKG}/... | grep -v vendor | grep -v '/test/e2e' | grep -v images`; do
|
||||
t=$(date +%s);
|
||||
go test -coverprofile=cover.out -covermode=atomic $d || exit 1;
|
||||
echo "Coverage test $d took $(($(date +%s)-$t)) seconds";
|
||||
if [ -f cover.out ]; then
|
||||
cat cover.out >> coverage.txt;
|
||||
rm cover.out;
|
||||
fi;
|
||||
for d in $(go list "${PKG}/..." | grep -v vendor | grep -v '/test/e2e' | grep -v images); do
|
||||
t=$(date +%s);
|
||||
go test -coverprofile=cover.out -covermode=atomic "$d" || exit 1;
|
||||
echo "Coverage test $d took $(($(date +%s)-$t)) seconds";
|
||||
if [ -f cover.out ]; then
|
||||
cat cover.out >> coverage.txt;
|
||||
rm cover.out;
|
||||
fi;
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue