Skip to content

Commit

Permalink
Remove test-integration.sh dependance on symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Jul 18, 2017
1 parent 8385bd2 commit 02cb731
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hack/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ loop="${TIMES:-1}"
# hack/test-integration.sh WatchBuilds
# hack/test-integration.sh Template*
# hack/test-integration.sh "(WatchBuilds|Template)"
tests=( $(go run "${OS_ROOT}/hack/listtests.go" -prefix="${OS_GO_PACKAGE}/${package}.Test" "${testexec}" | grep -E "${1-Test}") )
listTemplate='{{ range $i,$file := .TestGoFiles }}{{$.Dir}}/{{ $file }}{{ "\n" }}{{end}}'
tests=( $(go list -f "${listTemplate}" "./${package}" | xargs grep -E -o --no-filename '^func Test[^(]+' | cut -d ' ' -f 2 | grep -E "${1-Test}") )

if [[ "${#tests[@]}" == "0" ]]; then
os::text::print_red "No tests found matching \"${1-Test}\""
exit 1
fi

# run each test as its own process
ret=0
Expand Down

0 comments on commit 02cb731

Please sign in to comment.