diff --git a/common/build-style/go.sh b/common/build-style/go.sh index 711b797..d6c6539 100644 --- a/common/build-style/go.sh +++ b/common/build-style/go.sh @@ -29,7 +29,7 @@ do_build() { fi done - go_package=${go_package:-$go_import_path} + : ${go_package:=$go_import_path} # Build using Go modules if there's a go.mod file if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then @@ -60,6 +60,12 @@ do_build() { fi } +do_check() { + : ${make_check_target:=./...} + + go test -p "$XBPS_MAKEJOBS" -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${make_check_args} ${make_check_target} +} + do_install() { for f in ${GOPATH}/bin/* ${GOPATH}/bin/**/*; do if [ -f "$f" ] && [ -x "$f" ]; then