mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: toaster/tests: Fixes warnings in autobuilder
../bitbake/lib/toaster/tests/functional/functional_helpers.py:66
/home/pokybuild/yocto-worker/toaster/build/bitbake/lib/toaster/tests/functional/functional_helpers.py:66: DeprecationWarning: invalid escape sequence '\s'
project_url=re.search("(projectPageUrl\s:\s\")(.*)(\",)",rc)
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/pokybuild/yocto-worker/toaster/build/bitbake/lib/toaster/tests/commands/test_runbuilds.py", line 39, in run
os.kill(int(pid), signal.SIGTERM)
ProcessLookupError: [Errno 3] No such process
(Bitbake rev: 5a4732d5e4437cfc366c6b034868903ad6f0088c)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
23d3e2c718
commit
6d91225651
@@ -19,6 +19,10 @@ import time
|
||||
import subprocess
|
||||
import signal
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
logger = logging.getLogger("toaster")
|
||||
|
||||
class KillRunbuilds(threading.Thread):
|
||||
""" Kill the runbuilds process after an amount of time """
|
||||
@@ -34,9 +38,12 @@ class KillRunbuilds(threading.Thread):
|
||||
pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),
|
||||
".runbuilds.pid")
|
||||
|
||||
with open(pidfile_path) as pidfile:
|
||||
pid = pidfile.read()
|
||||
os.kill(int(pid), signal.SIGTERM)
|
||||
try:
|
||||
with open(pidfile_path) as pidfile:
|
||||
pid = pidfile.read()
|
||||
os.kill(int(pid), signal.SIGTERM)
|
||||
except ProcessLookupError:
|
||||
logger.warning("Runbuilds not running or already killed")
|
||||
|
||||
|
||||
class TestCommands(TestCase):
|
||||
|
||||
@@ -63,7 +63,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
|
||||
|
||||
def get_URL(self):
|
||||
rc=self.get_page_source()
|
||||
project_url=re.search("(projectPageUrl\s:\s\")(.*)(\",)",rc)
|
||||
project_url=re.search(r"(projectPageUrl\s:\s\")(.*)(\",)",rc)
|
||||
return project_url.group(2)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user