From 8c206d57d4fdb584a501e535cdf7dacbea57c744 Mon Sep 17 00:00:00 2001 From: "C.J. Collier" Date: Wed, 26 Apr 2017 09:11:37 -0700 Subject: [PATCH] Exit batch interpreter with error on failure: IOT-2119, RT#40028 Raise error on failure of "build" Raise error on failure of "test" Raise error on invalid target specification Change-Id: Icbcaaa8d3b3541ecdce640632b6fdeff9df4b142 Signed-off-by: C.J. Collier Signed-off-by: Dan Mihai Reviewed-on: https://gerrit.iotivity.org/gerrit/19401 Reviewed-by: Pawel Winogrodzki Reviewed-by: Omar Maabreh Reviewed-by: Way Vadhanasin --- run.bat | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/run.bat b/run.bat index a44f0c2..0fb581e 100644 --- a/run.bat +++ b/run.bat @@ -185,16 +185,25 @@ if "!RUN_ARG!"=="server" ( echo THREAD_COUNT=%THREAD_COUNT% echo AUTOMATIC_UPDATE=%AUTOMATIC_UPDATE% echo.scons VERBOSE=1 %BUILD_OPTIONS% - scons VERBOSE=1 %BUILD_OPTIONS% + call scons.bat VERBOSE=1 %BUILD_OPTIONS% + if ERRORLEVEL 1 ( + echo SCons failed - exiting run.bat with code 3 + exit /B 3 + ) ) else if "!RUN_ARG!"=="clean" ( del /S *.ilk - scons VERBOSE=1 %BUILD_OPTIONS% -c + call scons.bat VERBOSE=1 %BUILD_OPTIONS% -c + if ERRORLEVEL 1 ( + echo SCons failed - exiting run.bat with code 2 + exit /B 2 + ) ) else if "!RUN_ARG!"=="cleangtest" ( rd /s /q extlibs\gtest\googletest-release-1.7.0 del extlibs\gtest\release-1.7.0.zip ) else ( echo.%0 - Script requires a valid argument! - goto :EOF + echo Exiting run.bat with code 1 + exit /B 1 ) cd %IOTIVITY_DIR% -- 2.7.4