diff --git a/engine/common/host.c b/engine/common/host.c index 6c928886..da08c408 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -941,6 +941,7 @@ static void Host_RunTests( int stage ) TEST_LIST_1_CLIENT; #endif Msg( "Done! %d passed, %d failed\n", tests_stats.passed, tests_stats.failed ); + error_on_exit = tests_stats.failed >= 0 ? EXIT_FAILURE : EXIT_SUCCESS; Sys_Quit(); } } diff --git a/engine/common/system.c b/engine/common/system.c index 47828760..da64deed 100644 --- a/engine/common/system.c +++ b/engine/common/system.c @@ -53,7 +53,7 @@ GNU General Public License for more details. #include "library.h" #include "whereami.h" -static int error_on_exit = 0; // arg for exit(); +int error_on_exit = 0; // arg for exit(); /* ================ diff --git a/engine/common/system.h b/engine/common/system.h index d06055f7..15f27b0f 100644 --- a/engine/common/system.h +++ b/engine/common/system.h @@ -41,7 +41,7 @@ NOTE: never change this structure because all dll descriptions in xash code writes into struct by offsets not names ======================================================================== */ - +extern int error_on_exit; void Sys_Sleep( int msec ); double Sys_DoubleTime( void ); char *Sys_GetClipboardData( void );