Fix command that prepares the definitions of tests

parent 649eea10
......@@ -37,7 +37,18 @@ prepareTestCommands() {
local testIndex=0
local runTests=()
local tests=$(go test -list "Test.*" "${pkg}" | grep "^Test" || echo "")
echo "Listing tests for ${pkg} package"
local tempFile=$(mktemp)
local exitCode=0
go test -list "Test.*" "${pkg}" > ${tempFile} || exitCode=1
local tests=$(grep "^Test" ${tempFile})
rm ${tempFile}
if [[ ${exitCode} -ne 0 ]]; then
exit ${exitCode}
if [[ -z "${tests}" ]]; then
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment