From d8265e3b5b62a03b9c11ea1dadbd9958c193487b Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 30 Jul 2024 22:36:20 +0000 Subject: [PATCH] Fixing up bugs in script --- src/python_testing/TC_MCORE_FS_1_3.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/python_testing/TC_MCORE_FS_1_3.py b/src/python_testing/TC_MCORE_FS_1_3.py index ddde3a066e6757..18cacbc55ca1d7 100644 --- a/src/python_testing/TC_MCORE_FS_1_3.py +++ b/src/python_testing/TC_MCORE_FS_1_3.py @@ -43,11 +43,13 @@ async def setup_class(self): def teardown_class(self): - logging.warning("Stopping app with SIGTERM") - self.app_process_for_dut_eco.send_signal(signal.SIGTERM.value) - self.app_process_for_dut_eco.wait() + if self.app_process_for_dut_eco is not None: + logging.warning("Stopping app with SIGTERM") + self.app_process_for_dut_eco.send_signal(signal.SIGTERM.value) + self.app_process_for_dut_eco.wait() # TODO: Use timeout, if term doesn't work, try SIGINT if self.app_process_for_th_eco is not None: + logging.warning("Stopping app with SIGTERM") self.app_process_for_th_eco.send_signal(signal.SIGTERM.value) self.app_process_for_th_eco.wait()