wtest.bat 1.8 KB
Newer Older
S
TD-1057  
Shengliang Guan 已提交
1 2 3
@echo off

echo TDengine in windows
S
TD-1207  
Shengliang Guan 已提交
4
rem echo Start TDengine Testing Case ...
S
TD-1057  
Shengliang Guan 已提交
5 6

set "SCRIPT_DIR=%~dp0"
S
TD-1207  
Shengliang Guan 已提交
7
rem echo SCRIPT_DIR: %SCRIPT_DIR%
S
TD-1057  
Shengliang Guan 已提交
8

S
TD-1207  
Shengliang Guan 已提交
9 10 11 12
set "BUILD_DIR=%SCRIPT_DIR%..\..\..\debug\build\bin\"
set "TSIM=%BUILD_DIR%tsim"
rem echo BUILD_DIR:  %BUILD_DIR%
rem echo TSIM:       %TSIM%
S
TD-1057  
Shengliang Guan 已提交
13

S
TD-1207  
Shengliang Guan 已提交
14 15
set "SIM_DIR=%SCRIPT_DIR%..\..\..\sim\"
rem echo SIM_DIR:    %SIM_DIR%
S
TD-1057  
Shengliang Guan 已提交
16

S
TD-1207  
Shengliang Guan 已提交
17 18
set "TSIM_DIR=%SIM_DIR%tsim\"
rem echo TSIM_DIR:   %TSIM_DIR%
S
TD-1057  
Shengliang Guan 已提交
19

S
TD-1207  
Shengliang Guan 已提交
20 21
set "CFG_DIR=%TSIM_DIR%cfg\"
rem echo CFG_DIR:    %CFG_DIR%
S
TD-1057  
Shengliang Guan 已提交
22

S
TD-1207  
Shengliang Guan 已提交
23 24
set "LOG_DIR=%TSIM_DIR%log\"
rem echo LOG_DIR:    %LOG_DIR%
S
TD-1057  
Shengliang Guan 已提交
25

S
TD-1207  
Shengliang Guan 已提交
26 27
set "TAOS_CFG=%CFG_DIR%taos.cfg"
rem echo TAOS_CFG:   %TAOS_CFG%
S
TD-1057  
Shengliang Guan 已提交
28 29 30 31 32 33 34 35

if not exist %SIM_DIR%  mkdir %SIM_DIR%
if not exist %TSIM_DIR% mkdir %TSIM_DIR%
if exist %CFG_DIR% rmdir /s/q %CFG_DIR%
if exist %LOG_DIR% rmdir /s/q %LOG_DIR%
if not exist %CFG_DIR% mkdir %CFG_DIR%
if not exist %LOG_DIR% mkdir %LOG_DIR%

S
TD-1207  
Shengliang Guan 已提交
36
rem set "fqdn="
S
TD-1207  
Shengliang Guan 已提交
37 38 39 40 41 42
for /f "skip=1" %%A in (
  'wmic computersystem get caption'
) do if not defined fqdn set "fqdn=%%A"

echo firstEp        %fqdn%        > %TAOS_CFG%
echo fqdn           %fqdn%        >> %TAOS_CFG%
S
TD-1207  
Shengliang Guan 已提交
43 44 45 46
echo serverPort     7100          >> %TAOS_CFG%
echo logDir         %LOG_DIR%     >> %TAOS_CFG%
echo scriptDir      %SCRIPT_DIR%  >> %TAOS_CFG%
echo numOfLogLines  100000000     >> %TAOS_CFG%
S
TD-1207  
Shengliang Guan 已提交
47
echo rpcDebugFlag   135           >> %TAOS_CFG%
S
TD-1207  
Shengliang Guan 已提交
48
echo tmrDebugFlag   131           >> %TAOS_CFG%
S
TD-1207  
Shengliang Guan 已提交
49 50
echo cDebugFlag     135           >> %TAOS_CFG%
echo udebugFlag     135           >> %TAOS_CFG%
S
TD-1207  
Shengliang Guan 已提交
51 52 53 54 55 56
echo wal            0             >> %TAOS_CFG%
echo asyncLog       0             >> %TAOS_CFG%
echo locale         en_US.UTF-8   >> %TAOS_CFG%
echo enableCoreFile 1             >> %TAOS_CFG%

set "FILE_NAME=testSuite.sim"
S
TD-1057  
Shengliang Guan 已提交
57 58
if "%1" == "-f" set "FILE_NAME=%2"

S
TD-1207  
Shengliang Guan 已提交
59
rem echo FILE_NAME:  %FILE_NAME%
S
TD-1057  
Shengliang Guan 已提交
60 61
echo ExcuteCmd:  %tsim% -c %CFG_DIR% -f %FILE_NAME%

S
TD-1207  
Shengliang Guan 已提交
62
%TSIM% -c %CFG_DIR% -f %FILE_NAME%