From cd99a611ac095cffc14c64b753a1196f3dfadd7b Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 4 Apr 2023 13:59:15 +0800 Subject: [PATCH] test: ci not pass , modify path --- tests/system-test/0-others/walRetention.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/system-test/0-others/walRetention.py b/tests/system-test/0-others/walRetention.py index e21ff535ee..befecf0f8a 100644 --- a/tests/system-test/0-others/walRetention.py +++ b/tests/system-test/0-others/walRetention.py @@ -218,16 +218,14 @@ class TDTestCase: self.conn = conn # init cluster path - projDir = __file__ - pos = projDir.find("tests") - if pos != -1: - self.projDir = projDir[:pos] + selfPath = os.path.dirname(os.path.realpath(__file__)) + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] else: - self.projDir = __file__ - self.projDir += "sim/" + projPath = selfPath[:selfPath.find("tests")] + self.projDir += f"{projPath}sim/" + tdLog.info(f" init projPath={projPath}") - # udf path - self.udf_path = os.path.dirname(os.path.realpath(__file__)) + "/udfpy" self.column_dict = { 'ts': 'timestamp', 'col1': 'tinyint', -- GitLab