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

Merge branch 'fix-prepare-test-definitions-step' into 'master'

Fix command that prepares the definitions of tests

See merge request gitlab-org/gitlab-runner!1044
parents 649eea10 0c30d40e
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment