Skip to content

Commit 19fb6ef

Browse files
authored
Return error exit code when no tests are run in hcttest.cmd (#4499)
1 parent 6cf7fbb commit 19fb6ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

utils/hct/hcttest.cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,18 @@ call :check_result "hcttest-extras tests" %RES_EXTRAS%
371371
call :check_result "hcttest-after script" %RES_HCTTEST_AFTER%
372372
call :check_result "dxilconv tests" %RES_DXILCONV%
373373

374+
set EXIT_CODE=%TESTS_FAILED%
374375
if not "%TESTS_PASSED%"=="0" (
375376
echo %TESTS_PASSED% succeeded.
376377
) else if "%TESTS_FAILED%"=="0" (
377378
echo No Unit tests run.
379+
set EXIT_CODE=1
378380
)
379381
if not "%TESTS_FAILED%"=="0" (
380382
echo %TESTS_FAILED% failed.
381383
)
382384
echo ==================================
383-
exit /b %TESTS_FAILED%
385+
exit /b %EXIT_CODE%
384386

385387
:showhelp
386388

0 commit comments

Comments
 (0)