Skip to content

Commit

Permalink
Merge pull request #22352 from taosdata/test/fix_windows_case
Browse files Browse the repository at this point in the history
test:fix windows cases
  • Loading branch information
plum-lihui committed Aug 8, 2023
2 parents 445277f + a0c5d13 commit d683e13
Show file tree
Hide file tree
Showing 59 changed files with 78 additions and 63 deletions.
2 changes: 1 addition & 1 deletion tests/pytest/util/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AutoGen:
def __init__(self):
self.ts = 1600000000000
self.batch_size = 100
seed = time.clock_gettime(time.CLOCK_REALTIME)
seed = time.time() % 10000
random.seed(seed)

# set start ts
Expand Down
2 changes: 0 additions & 2 deletions tests/script/win-test-file
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
./test.sh -f tsim/user/basic.sim
./test.sh -f tsim/user/password.sim
./test.sh -f tsim/user/privilege_db.sim
./test.sh -f tsim/user/privilege_sysinfo.sim
./test.sh -f tsim/user/privilege_topic.sim
./test.sh -f tsim/user/privilege_table.sim
./test.sh -f tsim/user/privilege_create_db.sim
./test.sh -f tsim/db/alter_option.sim
./test.sh -f tsim/db/alter_replica_31.sim
./test.sh -f tsim/db/basic1.sim
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/1-insert/rowlength64k_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/2-query/columnLenUpdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def taos_command (buildPath, key, value, expectString, sqlString=''):
taosCmd = buildPath + '/build/bin/taos '

cfgPath = buildPath + "/../sim/psim/cfg"
taosCmd = taosCmd + ' -c' + cfgPath + ' -' + key
taosCmd = taosCmd + ' -c ' + cfgPath + ' -' + key
if len(value) != 0:
taosCmd = taosCmd + ' ' + value

Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/2-query/slimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode2mnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeDrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeDropInsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeStop.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeStopConnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeStopInsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/6-cluster/5dnode3mnodeStopLoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def getBuildPath(self):
projPath = selfPath[:selfPath.find("tests")]

for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if ("taosd" in files or "taosd.exe" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root) - len("/build/bin")]
Expand Down

0 comments on commit d683e13

Please sign in to comment.