test_l3_longevity.py comma separator between commands, allow errors to be printed out (do not catch errors)

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-05-10 17:44:12 -06:00
parent 0f186befea
commit 901ae2b7dc
3 changed files with 12 additions and 8 deletions

View File

@@ -103,15 +103,20 @@ class lf_check():
#scripts_wd = os.getcwd()
print("file_wd {}".format(self.scripts_wd))
try:
os.chdir(self.scripts_wd)
print("Current Working Directory {}".format(os.getcwd()))
except:
print("failed to change to {}".format(self.scripts_wd))
cmd_args = "{}".format(self.test_dict[test]['args'])
command = "{}/{} {}".format(self.scripts_wd,self.test_dict[test]['command'], cmd_args)
command = "./{} {}".format(self.test_dict[test]['command'], cmd_args)
#command = "{}/{}".format(scripts_wd,self.test_dict[test]['command'])
# cmd_args = "{}".format(self.test_dict[test]['args'])
print("command: {}".format(command))
print("cmd_args {}".format(cmd_args))
#try:
process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
process = subprocess.run((command).split(' '), check= False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
#process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
print("###################### STDOUT #########################")
@@ -124,11 +129,9 @@ class lf_check():
def main():
check = lf_check()
print("Here 1")
#check.parse_ap_stats()
check.read_config_contents() # CMR need mode to just print out the test config and not run
print("Here 2")
check.run_script_test()