Skip to content
Snippets Groups Projects
Unverified Commit 0c30d40e authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Fix command that prepares the definitions of tests

parent 649eea10
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,18 @@ prepareTestCommands() { ...@@ -37,7 +37,18 @@ prepareTestCommands() {
local testIndex=0 local testIndex=0
local runTests=() 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 if [[ -z "${tests}" ]]; then
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment