1
0
mirror of https://github.com/rancher/norman.git synced 2025-04-27 19:15:07 +00:00
norman/scripts/test
Eric Promislow aea209ce8e Gengo v2 dropped the args package.
Norman doesn't use any other parts of gengo, so just inline the one
function it uses from gengo v1.
2024-05-05 15:21:27 -07:00

12 lines
313 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname $0)/..
echo Running tests
PACKAGES="$(find . -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
[ "${ARCH}" == "amd64" ] && RACE=-race
go test ${RACE} -cover -tags=test ${PACKAGES}