test: add platform logic (#11459)
* [TD-13558]<feature>: taos shell refactor add taosTools as submodule * add tools/taos-tools * add more client interface for taosTools compile * update taos-tools * update taos-tools * refactor shell * [TD-13558]<feature>: taos shell test speed * [TD-13558]<feature>: taos -n startup works * taos -n rpc works * taos -n server works * cleanup code since no endPort in 3.0 * update taos-tools * [TD-13558]<feature>: taos -C works * improve taos shell -c WIP * update taos-tools * add demoapi.c * adjust show databases result for 3.0 * test: add platform logic
This commit is contained in:
parent
4e9a9318c5
commit
6eba8ad1ab
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import platform
|
||||
import sys
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
|
@ -70,6 +71,8 @@ class TDTestCase:
|
|||
tdLog.info("tdSql.checkData(0, 0, '34567')")
|
||||
tdSql.checkData(0, 0, '34567')
|
||||
tdLog.info("insert into tb values (now+4a, \"'';\")")
|
||||
|
||||
if platform.system() == "Linux":
|
||||
config_dir = subprocess.check_output(
|
||||
str("ps -ef |grep dnode1|grep -v grep |awk '{print $NF}'"),
|
||||
stderr=subprocess.STDOUT,
|
||||
|
@ -89,13 +92,6 @@ class TDTestCase:
|
|||
(binPath, (config_dir))).readlines())
|
||||
if "Query OK" not in result:
|
||||
tdLog.exit("err:insert '';")
|
||||
tdLog.info('drop database db')
|
||||
tdSql.execute('drop database db')
|
||||
tdLog.info('show databases')
|
||||
tdSql.query('show databases')
|
||||
tdLog.info('tdSql.checkRow(0)')
|
||||
tdSql.checkRows(1)
|
||||
# convert end
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
|
|
Loading…
Reference in New Issue