Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix work item exit code for helix tests #45164

Merged
merged 2 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion eng/testing/RunnerTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ pushd %EXECUTION_DIR%
@echo off
popd
echo ----- end %DATE% %TIME% ----- exit code %ERRORLEVEL% ----------------------------------------------------------
exit /b %ERRORLEVEL%
:: The helix work item should not exit with non-zero if tests ran and produced results
:: The special console runner for runtime returns 1 when tests fail
if %ERRORLEVEL%==1 (
exit /b 0
) else (
exit /b %ERRORLEVEL%
alexperovich marked this conversation as resolved.
Show resolved Hide resolved
)
:: ========================= END Test Execution =================================

:usage
Expand Down
8 changes: 7 additions & 1 deletion eng/testing/RunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,10 @@ if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
fi
popd >/dev/null
# ======================== END Core File Inspection ==========================
exit $test_exitcode
# The helix work item should not exit with non-zero if tests ran and produced results
# The special console runner for runtime returns 1 when tests fail
if [ "$test_exitcode" == "1" ]; then
exit 0
else
exit $test_exitcode
alexperovich marked this conversation as resolved.
Show resolved Hide resolved
fi