lf_check.py : added support for infinite timeout

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-09-07 11:22:11 -06:00
parent 195ba76a65
commit 426ed83005
2 changed files with 6 additions and 3 deletions

View File

@@ -206,7 +206,7 @@
"CT-US-001_lf_ap_auto_test": {
"enabled": "TRUE",
"command": "lf_ap_auto_test.py",
"timeout":"1200",
"timeout":"0",
"iterations":"1",
"args": "",
"args_list":[

View File

@@ -1059,7 +1059,10 @@ http://{blog}:2368""".format(blog=self.blog_host)
universal_newlines=True)
# if there is a better solution please propose, the TIMEOUT Result is different then FAIL
try:
process.wait(timeout=int(self.test_timeout))
if int(self.test_timeout != 0):
process.wait(timeout=int(self.test_timeout))
else:
process.wait()
except subprocess.TimeoutExpired:
process.terminate()
self.test_result = "TIMEOUT"
@@ -1418,7 +1421,7 @@ Example :
print("lf_radio_df:: {lf_radio_df}".format(lf_radio_df=lf_radio_df))
except Exception as error:
print("print_exc():")
print("print_exc(): {error}".format(error=error))
traceback.print_exc(file=sys.stdout)
lf_radio_df = pd.DataFrame()
print("get_lanforge_radio_json exception, no radio data")