toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 1/4] toaster/test: Ensure to kill toaster process create for tests functional
Date: Fri,  8 Dec 2023 02:53:46 +0100	[thread overview]
Message-ID: <20231208015349.678997-1-alassane.yattara@savoirfairelinux.com> (raw)

Toaster background task runbuilds continu running when even if tests is
done
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/tests/functional/functional_helpers.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/tests/functional/functional_helpers.py b/lib/toaster/tests/functional/functional_helpers.py
index b80d403b..c37c5f8d 100644
--- a/lib/toaster/tests/functional/functional_helpers.py
+++ b/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):
-- 
2.34.1



             reply	other threads:[~2023-12-08  1:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08  1:53 Alassane Yattara [this message]
2023-12-08  1:53 ` [PATCH 2/4] toaster/test: Added functional/utils, contains useful methods using by functional tests Alassane Yattara
2023-12-08  1:53 ` [PATCH 3/4] toaster/test: Refactorize tests/functional Alassane Yattara
2023-12-08  1:53 ` [PATCH 4/4] toaster/test: Bug fixes, functional tests dependent on each other Alassane Yattara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231208015349.678997-1-alassane.yattara@savoirfairelinux.com \
    --to=alassane.yattara@savoirfairelinux.com \
    --cc=toaster@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).