-suffle=on and -count=2 option is added to TESTFLAGS

Signed-off-by: Alfonso Uceda <uceda73@gmail.com>
pull/31013/head
Alfonso Uceda 3 months ago
parent 17b3b5b19f
commit f243617229

@ -21,7 +21,7 @@ ACCEPTANCE_RUN_TESTS=.
PKG := ./...
TAGS :=
TESTS := .
TESTFLAGS :=
TESTFLAGS := -shuffle=on -count=2
LDFLAGS := -w -s
GOFLAGS :=
CGO_ENABLED ?= 0
@ -119,7 +119,7 @@ test-unit:
test-coverage:
@echo
@echo "==> Running unit tests with coverage <=="
@ ./scripts/coverage.sh
@ TESTFLAGS="${TESTFLAGS}" ./scripts/coverage.sh
.PHONY: test-style
test-style:

@ -16,6 +16,8 @@
set -euo pipefail
TESTFLAGS=${TESTFLAGS:-}
covermode=${COVERMODE:-atomic}
coverdir=$(mktemp -d /tmp/coverage.XXXXXXXXXX)
profile="${coverdir}/cover.out"
@ -24,7 +26,7 @@ generate_cover_data() {
for d in $(go list ./...) ; do
(
local output="${coverdir}/${d//\//-}.cover"
go test -coverprofile="${output}" -covermode="$covermode" "$d"
go test ${TESTFLAGS} -coverprofile="${output}" -covermode="$covermode" "$d"
)
done
@ -40,4 +42,3 @@ case "${1-}" in
go tool cover -html "${profile}"
;;
esac

Loading…
Cancel
Save