From b929a735262050d545679c1fbc6d6ab50c4c81f7 Mon Sep 17 00:00:00 2001 From: Feng Chao Date: Fri, 8 Nov 2024 08:02:50 +0800 Subject: [PATCH] Update test_passwd.py --- tests/army/user/test_passwd.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/army/user/test_passwd.py b/tests/army/user/test_passwd.py index c205273973..dfec175824 100644 --- a/tests/army/user/test_passwd.py +++ b/tests/army/user/test_passwd.py @@ -1,4 +1,5 @@ import os +import platform import subprocess from frame.log import * from frame.cases import * @@ -25,6 +26,12 @@ class TDTestCase(TBase): def run(self): apiPath = self.apiPath() tdLog.info(f"api path: {apiPath}") + if platform.system().lower() == 'linux': + 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") + p = subprocess.Popen(f"ls {apiPath}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() tdLog.info(f"test files: {out}")