Commit 0c30d40e authored by Tomasz Maczukin's avatar Tomasz Maczukin

Fix command that prepares the definitions of tests

parent 649eea10
Pipeline #32110241 passed with stages
in 27 minutes and 50 seconds
......@@ -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}
fi
if [[ -z "${tests}" ]]; then
continue
......
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