From 9392ce3974d8b27d20ccef73d17f2b19569d3e22 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 23 Jun 2023 10:28:02 -1000 Subject: [PATCH] Visual Studio Projects: Exit build with failure on tests or source check fails --- Visual Studio Projects/Post-Build-Event.cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Visual Studio Projects/Post-Build-Event.cmd b/Visual Studio Projects/Post-Build-Event.cmd index c199c7e0..00a72462 100644 --- a/Visual Studio Projects/Post-Build-Event.cmd +++ b/Visual Studio Projects/Post-Build-Event.cmd @@ -56,6 +56,9 @@ goto _check_source :_got_script %2 "%_script_path%" "%4" +rem if the simulator test(s) fail then this is a failed build +rem so delete the simulator binary. +if ERRORLEVEL 1 del %2 & exit /B 1 :_check_source setlocal enabledelayedexpansion @@ -74,4 +77,4 @@ del %_project_linedeps% echo Checking Source in %~n2 simulator... %2 %_deps_switches% CheckSourceCode %_deps_line% set _deps_line= -if errorlevel 1 exit /B 1 +if errorlevel 1 del %2 & exit /B 1