fix_: catching gotestsum exit code

This commit is contained in:
Igor Sirotin 2024-06-21 12:10:44 +01:00
parent b25ff41e51
commit 61322b8dab
1 changed files with 3 additions and 2 deletions

View File

@ -88,16 +88,17 @@ run_test_for_package() {
-v ${GOTEST_EXTRAFLAGS} \
-timeout "${package_timeout}" \
-count 1 \
-tags "${BUILD_TAGS}" |
-tags "${BUILD_TAGS}" | \
redirect_stdout "${output_file}"
local go_test_exit=$?
# Merge package coverage results
go run ./cmd/test-coverage-utils/gocovmerge.go ${package_dir}/coverage.out.rerun.* > ${coverage_file}
# Cleanup coverage reports
rm -f ${package_dir}/coverage.out.rerun.*
local go_test_exit=$?
echo "${go_test_exit}" > "${exit_code_file}"
if [[ "${go_test_exit}" -ne 0 ]]; then
if [[ "${CI}" == 'true' ]]; then