github.com/Aoi-hosizora/ahlib@v1.5.1-0.20230404072829-241b93cf91c7/go.test.sh (about) 1 #!/bin/bash 2 3 set -e 4 function test_module { 5 for package in $(go list ./...); do 6 go test $package -v -count=1 -race -cover -covermode=atomic -coverprofile=$profile 7 test -f $profile && cat $profile >> $coverage && rm $profile 8 done 9 } 10 11 rm -f coverage.txt 12 coverage=coverage.txt 13 profile=profile.out 14 test_module 15 16 coverage=../coverage.txt 17 profile=../profile.out 18 cd xgeneric && test_module && cd ..