Skip to content

Commit

Permalink
echo git diff
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Oct 30, 2021
1 parent 4c74643 commit 163113a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/module-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ execute_mod_tests() {
# TODO: in the future we will need to disable it once we go into multi module setup, because
# we will have cross module dependencies.
if [ -n "$GIT_DIFF" ] && ! grep $mod_dir <<< $GIT_DIFF; then
echo "ignoring module $mod_dir - no changes in the module";
echo ">>> ignoring module $mod_dir - no changes in the module";
return;
fi;

echo "executing $go_mod tests"
echo ">>> running $go_mod tests"
cd $mod_dir;
go test -mod=readonly -timeout 30m -coverprofile=${root_dir}/${coverage_file}.tmp -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
local ret=$?
Expand All @@ -31,12 +31,14 @@ execute_mod_tests() {
return $ret;
}

GIT_DIFF=`git status --porcelain`
# GIT_DIFF=`git status --porcelain`

echo "GIT_DIFF: " $GIT_DIFF

coverage_file=coverage-go-submod-profile.out
return_val=0;

for f in $(find -name go.mod -not -path "./go.mod") "./container/go.mod"; do
for f in $(find -name go.mod -not -path "./go.mod"); do
execute_mod_tests $f;
if [[ $? -ne 0 ]] ; then
return_val=2;
Expand Down

0 comments on commit 163113a

Please sign in to comment.