提交 d5ab6209 编写于 作者: wafwerar's avatar wafwerar

test: add test time count print

上级 778d58c2
......@@ -16,12 +16,12 @@ rem echo NODE: %NODE%
set SCRIPT_DIR=%~dp0..\
rem echo SCRIPT_DIR: %SCRIPT_DIR%
set BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\
echo %cd% | grep community > nul && set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\" || set "BUILD_DIR=%SCRIPT_DIR%..\..\debug\build\bin\"
set TSIM=%BUILD_DIR%tsim
rem echo BUILD_DIR: %BUILD_DIR%
rem echo TSIM: %TSIM%
set SIM_DIR=%SCRIPT_DIR%..\..\..\sim\
echo %cd% | grep community > nul && set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\" || set "SIM_DIR=%SCRIPT_DIR%..\..\sim\"
rem echo SIM_DIR: %SIM_DIR%
set NODE_DIR=%SIM_DIR%%NODE_NAME%\
......
......@@ -4,7 +4,7 @@ echo Executing copy_udf.bat
set SCRIPT_DIR=%cd%
echo SCRIPT_DIR: %SCRIPT_DIR%
cd ..\..\..
echo %cd% | grep community > nul && cd ..\..\.. || cd ..\..
set TAOS_DIR=%cd%
echo find udf library in %TAOS_DIR%
set UDF1_DIR=%TAOS_DIR%\debug\build\lib\udf1.dll
......
......@@ -13,12 +13,12 @@ rem echo NODE: %NODE%
set SCRIPT_DIR=%~dp0..\
rem echo SCRIPT_DIR: %SCRIPT_DIR%
set BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\
echo %cd% | grep community > nul && set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\" || set "BUILD_DIR=%SCRIPT_DIR%..\..\debug\build\bin\"
set TSIM=%BUILD_DIR%tsim
rem echo BUILD_DIR: %BUILD_DIR%
rem echo TSIM: %TSIM%
set SIM_DIR=%SCRIPT_DIR%..\..\..\sim\
echo %cd% | grep community > nul && set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\" || set "SIM_DIR=%SCRIPT_DIR%..\..\sim\"
rem echo SIM_DIR: %SIM_DIR%
set NODE_DIR=%SIM_DIR%%NODE_NAME%\
......
......@@ -13,12 +13,12 @@ rem echo NODE: %EXEC_OPTON%
set SCRIPT_DIR=%~dp0..\
rem echo SCRIPT_DIR: %SCRIPT_DIR%
set BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\
echo %cd% | grep community > nul && set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\" || set "BUILD_DIR=%SCRIPT_DIR%..\..\debug\build\bin\"
set TAOSD=%BUILD_DIR%taosd
rem echo BUILD_DIR: %BUILD_DIR%
rem echo TAOSD: %TAOSD%
set SIM_DIR=%SCRIPT_DIR%..\..\..\sim\
echo %cd% | grep community > nul && set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\" || set "SIM_DIR=%SCRIPT_DIR%..\..\sim\"
rem echo SIM_DIR: %SIM_DIR%
set NODE_DIR=%SIM_DIR%%NODE_NAME%\
......
......@@ -197,22 +197,22 @@ print $switch_loop_cnt
if $switch_loop_cnt == 1 then
sql show vgroups
$dnodeId = $data[1][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 2 then
sql show vgroups
$dnodeId = $data[2][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 3 then
sql show vgroups
$dnodeId = $data[3][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 4 then
sql show vgroups
$dnodeId = $data[4][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
else
......
......@@ -290,22 +290,22 @@ print $switch_loop_cnt
if $switch_loop_cnt == 1 then
sql show vgroups
$dnodeId = $data[1][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 2 then
sql show vgroups
$dnodeId = $data[2][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 3 then
sql show vgroups
$dnodeId = $data[3][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 4 then
sql show vgroups
$dnodeId = $data[4][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
else
......
......@@ -227,22 +227,22 @@ print $switch_loop_cnt
if $switch_loop_cnt == 1 then
sql show vgroups
$dnodeId = $data[1][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 2 then
sql show vgroups
$dnodeId = $data[2][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 3 then
sql show vgroups
$dnodeId = $data[3][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
elif $switch_loop_cnt == 4 then
sql show vgroups
$dnodeId = $data[4][3]
$dnodeId = $data[0][3]
$dnodeId = dnode . $dnodeId
goto switch_leader_to_offine_loop
else
......
@echo off
set EXEC_OPTON=start
set DB_NAME=db
set CDB_NAME=db
set /a POLL_DELAY=5
set /a VALGRIND=0
set SIGNAL=SIGINT
set /a SHOW_MSG=0
set /a SHOW_ROW=0
set /a EXP_USE_SNAPSHOT=0
:param
if "%1"=="" (
goto :end
)
if %1 == -d ( set "DB_NAME=%2" && shift && shift && goto :param )
if %1 == -g ( set "SHOW_MSG=%2" && shift && shift && goto :param )
if %1 == -r ( set "SHOW_ROW=%2" && shift && shift && goto :param )
if %1 == -s ( set "EXEC_OPTON=%2" && shift && shift && goto :param )
if %1 == -v ( set "VALGRIND=1" && shift && goto :param )
if %1 == -y ( set "POLL_DELAY=%2" && shift && shift && goto :param )
if %1 == -x ( set "SIGNAL=%2" && shift && shift && goto :param )
if %1 == -w ( set "CDB_NAME=%2" && shift && shift && goto :param )
if %1 == -e ( set "EXP_USE_SNAPSHOT=%2" && shift && shift && goto :param )
echo unkown argument %1
goto :eof
:end
echo EXEC_OPTON %EXEC_OPTON%
echo DB_NAME %DB_NAME%
echo CDB_NAME %CDB_NAME%
echo POLL_DELAY %POLL_DELAY%
echo VALGRIND %VALGRIND%
echo SIGNAL %SIGNAL%
echo SHOW_MSG %SHOW_MSG%
echo SHOW_ROW %SHOW_ROW%
echo EXP_USE_SNAPSHOT %EXP_USE_SNAPSHOT%
echo %cd% | grep community > nul && cd ..\..\.. || cd ..\..
set BUILD_DIR=%cd%\debug\build\bin
set SIM_DIR=%cd%\sim
set PRG_DIR=%SIM_DIR%\tsim
set CFG_DIR=%PRG_DIR%\cfg
set LOG_DIR=%PRG_DIR%\log
set PROGRAM=%BUILD_DIR%\tmq_sim.exe
echo ------------------------------------------------------------------------
echo BUILD_DIR : %BUILD_DIR%
echo SIM_DIR : %SIM_DIR%
echo CFG_DIR : %CFG_DIR%
echo PRG_DIR : %PRG_DIR%
echo CFG_DIR : %CFG_DIR%
echo LOG_DIR : %LOG_DIR%
echo PROGRAM : %PROGRAM%
echo POLL_DELAY : %POLL_DELAY%
echo DB_NAME : %DB_NAME%
echo ------------------------------------------------------------------------
if "%EXEC_OPTON%" == "start" (
echo mintty -h never %PROGRAM% -c %CFG_DIR% -y %POLL_DELAY% -d %DB_NAME% -g %SHOW_MSG% -r %SHOW_ROW% -w %CDB_NAME% -e %EXP_USE_SNAPSHOT%
mintty -h never %PROGRAM% -c %CFG_DIR% -y %POLL_DELAY% -d %DB_NAME% -g %SHOW_MSG% -r %SHOW_ROW% -w %CDB_NAME% -e %EXP_USE_SNAPSHOT%
) else (
if "%SIGNAL%" == "SIGKILL" ( ps | grep tmq_sim | awk '{print $2}' | xargs kill -9 ) else ( ps | grep tmq_sim | awk '{print $2}' | xargs kill -SIGINT )
)
goto :eof
......@@ -6,12 +6,12 @@ rem echo Start TDengine Testing Case ...
set "SCRIPT_DIR=%~dp0"
rem echo SCRIPT_DIR: %SCRIPT_DIR%
set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\"
echo %cd% | grep community > nul && set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\" || set "BUILD_DIR=%SCRIPT_DIR%..\..\debug\build\bin\"
set "TSIM=%BUILD_DIR%tsim"
rem echo BUILD_DIR: %BUILD_DIR%
rem echo TSIM: %TSIM%
set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\"
echo %cd% | grep community > nul && set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\" || set "SIM_DIR=%SCRIPT_DIR%..\..\sim\"
rem echo SIM_DIR: %SIM_DIR%
set "TSIM_DIR=%SIM_DIR%tsim\"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册