diff --git a/tests/army/user/test_passwd.py b/tests/army/user/test_passwd.py index 1017805105..62dc5782b7 100644 --- a/tests/army/user/test_passwd.py +++ b/tests/army/user/test_passwd.py @@ -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())