engine: exit with non-zero return code if engine tests are failed

This commit is contained in:
Alibek Omarov 2024-04-18 16:36:18 +03:00
parent ac46164a6e
commit 213650db8f
3 changed files with 3 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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();
/*
================

View File

@ -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 );