We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8385bd2 commit 02cb731Copy full SHA for 02cb731
hack/test-integration.sh
@@ -106,7 +106,13 @@ loop="${TIMES:-1}"
106
# hack/test-integration.sh WatchBuilds
107
# hack/test-integration.sh Template*
108
# hack/test-integration.sh "(WatchBuilds|Template)"
109
-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}}'
110
+tests=( $(go list -f "${listTemplate}" "./${package}" | xargs grep -E -o --no-filename '^func Test[^(]+' | cut -d ' ' -f 2 | grep -E "${1-Test}") )
111
+
112
+if [[ "${#tests[@]}" == "0" ]]; then
113
+ os::text::print_red "No tests found matching \"${1-Test}\""
114
+ exit 1
115
+fi
116
117
# run each test as its own process
118
ret=0
0 commit comments