Update test_passwd.py to add some log for debug

This commit is contained in:
Feng Chao 2024-11-06 09:45:19 +08:00 committed by GitHub
parent dcb63d054f
commit ffe1776f3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -23,11 +23,12 @@ class TDTestCase(TBase):
def run(self):
apiPath = self.apiPath()
tdLog.info(f"api path: {apiPath}")
if apiPath:
p = subprocess.Popen(f"cd {apiPath} && make", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if 0 != p.returncode:
tdLog.exit("Test script passwdTest.c make failed")
tdLog.exit(f"Test script passwdTest.c make failed with error: {err}")
test_file_cmd = os.sep.join([apiPath, "passwdTest localhost"])
else:
tdLog.exit("passwdTest.c not found")