From bcfdb1063fd553fa04fb7d062ada57b4a8785d3a Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 5 Oct 2021 21:15:31 -0600 Subject: [PATCH] lf_check.py : look for error in stdout Signed-off-by: Chuck SmileyRekiere --- py-scripts/tools/lf_check.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/py-scripts/tools/lf_check.py b/py-scripts/tools/lf_check.py index cf786e23..d523f0e2 100755 --- a/py-scripts/tools/lf_check.py +++ b/py-scripts/tools/lf_check.py @@ -1040,13 +1040,27 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url) self.text_result = "Failure" background = self.background_red else: - self.test_result = "Success" + self.text_result = "Success" background = self.background_green else: self.logger.info("File: {} is empty: {}".format(stderr_log_txt, str(stderr_log_size))) self.test_result = "Success" background = self.background_green + # Check to see if there is an error in stdout_log + if stdout_log_size > 0: + text = open(stdout_log_txt).read() + if 'error' in text.lower(): + self.test_result = "Failure" + background = self.background_red + else: + self.test_result = "Success" + background = self.background_green + else: + # if stdout empty that is a failure also + self.test_resut = "Failure" + background = self.background_red + # if there was a if self.test_result == "TIMEOUT": self.logger.info("TIMEOUT FAILURE, Check LANforge Radios")