Update test_passwd.py
This commit is contained in:
parent
e5098f82fa
commit
aaddf18e00
|
@ -28,16 +28,18 @@ class TDTestCase(TBase):
|
|||
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(f"Test script passwdTest.c make failed with error: {err}")
|
||||
tdLog.info(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")
|
||||
p = subprocess.Popen(test_file_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = p.communicate()
|
||||
if 0 != p.returncode:
|
||||
tdLog.exit("Failed to run passwd test with output: %s \n error: %s" % (out, err))
|
||||
tdLog.success(f"{__file__} successfully executed")
|
||||
|
||||
try:
|
||||
p = subprocess.Popen(test_file_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = p.communicate()
|
||||
if 0 != p.returncode:
|
||||
tdLog.exit("Failed to run passwd test with output: %s \n error: %s" % (out, err))
|
||||
tdLog.success(f"{__file__} successfully executed")
|
||||
except Exception as e:
|
||||
tdLog.exit(f"Failed to execute {__file__} with error: {e}")
|
||||
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
|
|
Loading…
Reference in New Issue