diff --git a/tests/script/sh/exec.bat b/tests/script/sh/exec.bat index 0f3d0dcf49..e4c998c25b 100644 --- a/tests/script/sh/exec.bat +++ b/tests/script/sh/exec.bat @@ -6,6 +6,7 @@ if %1 == -n set NODE_NAME=%2 if %1 == -s set EXEC_OPTON=%2 if %3 == -n set NODE_NAME=%4 if %3 == -s set EXEC_OPTON=%4 +if "%5" == "-x" set EXEC_SIGNAL=%6 rem echo NODE_NAME: %NODE_NAME% rem echo NODE: %EXEC_OPTON% @@ -39,7 +40,7 @@ rem echo TAOS_LOG: %TAOS_LOG% if %EXEC_OPTON% == start ( rm -rf %TAOS_LOG% echo start %TAOSD% -c %CFG_DIR% - start %TAOSD% -c %CFG_DIR% + mintty -h never %TAOSD% -c %CFG_DIR% set /a check_num=0 :check_online sleep 1 @@ -58,13 +59,25 @@ if %EXEC_OPTON% == stop ( rem echo wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" list INSTANCE rem wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" call terminate > NUL 2>&1 - for /f "tokens=1 skip=1" %%A in ( - 'wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" get processId ' - ) do ( - rem echo taskkill /IM %%A - taskkill /IM %%A > NUL 2>&1 + for /f "tokens=2" %%A in ('wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" get processId ^| xargs echo') do ( + for /f "tokens=1" %%B in ('ps ^| grep %%A') do ( + if "%EXEC_SIGNAL%" == "SIGKILL" ( + kill -9 %%B + ) else ( + kill -INT %%B + call :check_offline + ) + ) goto :finish ) ) +:finish +goto :eof -:finish \ No newline at end of file +:check_offline +sleep 1 +for /f "tokens=2" %%C in ('wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" get processId ^| xargs echo') do ( + echo check taosd offline + goto :check_offline +) +goto :eof \ No newline at end of file diff --git a/tests/script/test-all.bat b/tests/script/test-all.bat index 1c698449c6..f771f8fcb6 100644 --- a/tests/script/test-all.bat +++ b/tests/script/test-all.bat @@ -62,7 +62,5 @@ goto :eof :CheckSkipCase set skipCase=false -if "%*" == "./test.sh -f tsim/query/scalarFunction.sim" ( set skipCase=true ) -if "%*" == "./test.sh -f tsim/stream/distributeInterval0.sim" ( set skipCase=true ) -if "%*" == "./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim" ( set skipCase=true ) +@REM if "%*" == "./test.sh -f tsim/query/scalarFunction.sim" ( set skipCase=true ) :goto eof \ No newline at end of file