Skip to content

Commit

Permalink
fix gocovmerge cannot work using old go version
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiwei Yin <[email protected]>
  • Loading branch information
zhiweiyin318 committed Dec 9, 2024
1 parent de03018 commit b549880
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

_script_dir=$(dirname "$0")

if ! which gocovmerge > /dev/null; then echo "Installing gocovmerge..."; pushd $(mktemp -d) && GOSUMDB=off go install github.com/wadey/gocovmerge@latest && popd; fi
#if ! which gocovmerge > /dev/null; then echo "Installing gocovmerge..."; pushd $(mktemp -d) && GOSUMDB=off go install github.com/wadey/gocovmerge@latest && popd; fi
if ! which patter > /dev/null; then echo "Installing patter ..."; pushd $(mktemp -d) && GOSUMDB=off go install github.com/apg/patter@latest && popd; fi

export GOFLAGS=""
Expand Down
8 changes: 4 additions & 4 deletions build/test-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ mkdir -p $_tap_out_dir
go test -v -cover -coverpkg=$_cover_pkgs -covermode=atomic -coverprofile=test/unit/coverage/cover.tmp $_package 2> >( grep -v "warning: no packages being tested depend on" >&2 ) | $GOPATH/bin/patter | tee $_tap_out_dir/$_tap_name.tap | grep -v "TAP version 13" | grep -v ": PASS:" | grep -v -i "# /us"

# Merge coverage files
if [ -f test/unit/coverage/cover.tmp ]; then
$GOPATH/bin/gocovmerge test/unit/coverage/cover.tmp test/unit/coverage/cover.out > test/unit/coverage/cover.all
mv test/unit/coverage/cover.all test/unit/coverage/cover.out
fi
#if [ -f test/unit/coverage/cover.tmp ]; then
# $GOPATH/bin/gocovmerge test/unit/coverage/cover.tmp test/unit/coverage/cover.out > test/unit/coverage/cover.all
# mv test/unit/coverage/cover.all test/unit/coverage/cover.out
#fi

# Clean up temporary files
rm -f test/unit/coverage/cover.tmp

0 comments on commit b549880

Please sign in to comment.