From f6cc0b360f5d6f7b50c6754fb2a215ad95fb63f1 Mon Sep 17 00:00:00 2001 From: Alassane Yattara Date: Fri, 8 Dec 2023 02:53:16 +0100 Subject: bitbake: toaster/tests: Ensure to kill toaster process create for tests functional Toaster background task runbuilds continu running when even if tests is done (Bitbake rev: e885863dffebab77f501a58df172926aafec5623) Signed-off-by: Alassane Yattara Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/functional/functional_helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster') diff --git a/bitbake/lib/toaster/tests/functional/functional_helpers.py b/bitbake/lib/toaster/tests/functional/functional_helpers.py index b80d403bec..c37c5f8d2f 100644 --- a/bitbake/lib/toaster/tests/functional/functional_helpers.py +++ b/bitbake/lib/toaster/tests/functional/functional_helpers.py @@ -33,11 +33,11 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): # start toaster cmd = "bash -c 'source toaster start'" - p = subprocess.Popen( + cls.p = subprocess.Popen( cmd, cwd=os.environ.get("BUILDDIR"), shell=True) - if p.wait() != 0: + if cls.p.wait() != 0: raise RuntimeError("Can't initialize toaster") super(SeleniumFunctionalTestCase, cls).setUpClass() @@ -58,6 +58,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): with open(os.path.join(builddir, '.runbuilds.pid'), 'r') as f: runbuilds_pid = int(f.read()) os.kill(runbuilds_pid, signal.SIGTERM) + cls.p.kill() def get_URL(self): -- cgit v1.2.3-54-g00ecf