Skip to content

Commit

Permalink
try split packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin8105 committed May 30, 2024
1 parent 995b139 commit 6d68ded
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mkdir -p ./testdata/
# github.com/Konstantin8105/c4go/version

# Package list
export PKGS=$(go list -e ./... | grep -v testdata | grep -v examples | grep -v tests | grep -v vendor | tr '\n' ' ')
# export PKGS="github.com/Konstantin8105/c4go github.com/Konstantin8105/c4go/util"
# export PKGS=$(go list -e ./... | grep -v testdata | grep -v examples | grep -v tests | grep -v vendor | tr '\n' ' ')
export PKGS="github.com/Konstantin8105/c4go github.com/Konstantin8105/c4go/util"

# View
echo "PKGS : $PKGS"
Expand All @@ -31,7 +31,9 @@ touch ./coverage.tmp

# Run tests
echo 'mode: atomic' > coverage.txt
echo "$PKGS" | xargs -n100 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.tmp -coverpkg $(go list ./... | grep -v /vendor | tr "\n" ",") {} && tail -n +2 coverage.tmp >> coverage.txt || exit 255' && rm coverage.tmp

# go list -e ./... | grep -v testdata | grep -v examples | grep -v tests | grep -v vendor | grep -v cmd | xargs -n100 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.tmp -coverpkg $(go list -e ./... | grep -v testdata | grep -v examples | grep -v tests | grep -v vendor | grep -v cmd | tr "\n" ",") {} && tail -n +2 coverage.tmp >> coverage.txt || exit 255' && rm coverage.tmp

echo "$PKGS" | xargs -n100 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.tmp -coverpkg $(echo "$PKGS" | tr "\n" ",") {} && tail -n +2 coverage.tmp >> coverage.txt || exit 255' && rm coverage.tmp

# Finilize
echo "End of coverage"

0 comments on commit 6d68ded

Please sign in to comment.