From 8bff4b87f429357ca870221273dd03f2b66c792a Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Tue, 28 Jun 2022 19:08:48 +0800 Subject: [PATCH] test: fix test exit --- tests/system-test/test-all.bat | 10 +++++----- tests/system-test/test.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/system-test/test-all.bat b/tests/system-test/test-all.bat index d4032cbc0d..2af23596a3 100644 --- a/tests/system-test/test-all.bat +++ b/tests/system-test/test-all.bat @@ -20,12 +20,12 @@ if "%1" == "full" ( call :GetTimeSeconds !time! set time1=!_timeTemp! echo Start at !time! - call %%i ARG1 > result_!a!.txt 2>error_!a!.txt + call %%i ARG1 > result_!a!.txt 2>error_!a!.txt || set errorlevel=8 if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && set /a exitNum=8 && echo %%i >>failed.txt ) else ( call :colorEcho 0a "Success" &echo. ) ) ) ) - exit !exitNum! + exit /b !exitNum! ) echo Windows Taosd Test for /F "usebackq tokens=*" %%i in (simpletest.bat) do ( @@ -36,8 +36,8 @@ for /F "usebackq tokens=*" %%i in (simpletest.bat) do ( call :GetTimeSeconds !timeNow! set time1=!_timeTemp! echo Start at !timeNow! - call %%i ARG1 > result_!a!.txt 2>error_!a!.txt - if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && echo result: && cat result_!a!.txt && echo error: && cat error_!a!.txt && exit 8 ) else ( call :colorEcho 0a "Success" &echo. ) + call %%i ARG1 > result_!a!.txt 2>error_!a!.txt || set errorlevel=8 + if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && echo result: && cat result_!a!.txt && echo error: && cat error_!a!.txt && exit /b 8 ) else ( call :colorEcho 0a "Success" &echo. ) ) ) @REM echo Linux Taosd Test @@ -52,7 +52,7 @@ for /F "usebackq tokens=*" %%i in (simpletest.bat) do ( @REM if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && echo result: && cat result_!a!.txt && echo error: && cat error_!a!.txt && exit 8 ) else ( call :colorEcho 0a "Success" &echo. ) @REM ) @REM ) -exit +exit /b :colorEcho set timeNow=%time% diff --git a/tests/system-test/test.py b/tests/system-test/test.py index 76b83da348..2d7f78661a 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -186,7 +186,7 @@ if __name__ == "__main__": tdLog.info("Procedures for tdengine deployed in %s" % (host)) if platform.system().lower() == 'windows': fileName = fileName.replace("/", os.sep) - if (masterIp == "" and not fileName[0:12] == "0-others\\udf"): + if (masterIp == "" and not fileName == "0-others\\udf_create.py"): threading.Thread(target=checkRunTimeError,daemon=True).start() tdLog.info("Procedures for testing self-deployment") tdDnodes.init(deployPath, masterIp) -- GitLab