Skip to content

Commit

Permalink
Oups fix missing directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
loicalbertin committed Feb 28, 2018
1 parent 6f44696 commit 0fee413
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ build/consul
/doc/_build/*
/dist
/plugin/testdata/plugin-sample/plugin-sample
build/coverprofiles/*

# Terraform infra
/testdata/infra/yorc
Expand Down
5 changes: 4 additions & 1 deletion build/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ pkgs=$(go list ./...)
pkgsList=$(echo "${pkgs}" | tr '\n' ',' | sed -e 's@^\(.*\),$@\1@')
profDir="${scriptDir}/coverprofiles"
rm -rf ${profDir}
mkdir -p ${profDir}

echo "mode: atomic" > coverage.txt
for d in ${pkgs}; do
pOutName="${profDir}/profile-$(echo "$d" | tr '/' '-').out"
go test -coverprofile=${pOutName} -covermode=atomic -coverpkg="${pkgsList}" $d 2>&1 | grep -v "warning: no packages being tested depend on"
if [[ "$?" != "0" ]] ; then
exit $?
fi
done

gocovermerge -output coverage.txt ${profDir}/*.out

0 comments on commit 0fee413

Please sign in to comment.