diff options
-rw-r--r-- | bitbake/lib/toaster/tests/commands/test_runbuilds.py | 13 | ||||
-rw-r--r-- | bitbake/lib/toaster/tests/functional/functional_helpers.py | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/tests/commands/test_runbuilds.py b/bitbake/lib/toaster/tests/commands/test_runbuilds.py index c77d6cf490..738d36e98d 100644 --- a/bitbake/lib/toaster/tests/commands/test_runbuilds.py +++ b/bitbake/lib/toaster/tests/commands/test_runbuilds.py | |||
@@ -19,6 +19,10 @@ import time | |||
19 | import subprocess | 19 | import subprocess |
20 | import signal | 20 | import signal |
21 | 21 | ||
22 | import logging | ||
23 | |||
24 | |||
25 | logger = logging.getLogger("toaster") | ||
22 | 26 | ||
23 | class KillRunbuilds(threading.Thread): | 27 | class KillRunbuilds(threading.Thread): |
24 | """ Kill the runbuilds process after an amount of time """ | 28 | """ Kill the runbuilds process after an amount of time """ |
@@ -34,9 +38,12 @@ class KillRunbuilds(threading.Thread): | |||
34 | pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), | 38 | pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), |
35 | ".runbuilds.pid") | 39 | ".runbuilds.pid") |
36 | 40 | ||
37 | with open(pidfile_path) as pidfile: | 41 | try: |
38 | pid = pidfile.read() | 42 | with open(pidfile_path) as pidfile: |
39 | os.kill(int(pid), signal.SIGTERM) | 43 | pid = pidfile.read() |
44 | os.kill(int(pid), signal.SIGTERM) | ||
45 | except ProcessLookupError: | ||
46 | logger.warning("Runbuilds not running or already killed") | ||
40 | 47 | ||
41 | 48 | ||
42 | class TestCommands(TestCase): | 49 | class TestCommands(TestCase): |
diff --git a/bitbake/lib/toaster/tests/functional/functional_helpers.py b/bitbake/lib/toaster/tests/functional/functional_helpers.py index c37c5f8d2f..d3e037a6d0 100644 --- a/bitbake/lib/toaster/tests/functional/functional_helpers.py +++ b/bitbake/lib/toaster/tests/functional/functional_helpers.py | |||
@@ -63,7 +63,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
63 | 63 | ||
64 | def get_URL(self): | 64 | def get_URL(self): |
65 | rc=self.get_page_source() | 65 | rc=self.get_page_source() |
66 | project_url=re.search("(projectPageUrl\s:\s\")(.*)(\",)",rc) | 66 | project_url=re.search(r"(projectPageUrl\s:\s\")(.*)(\",)",rc) |
67 | return project_url.group(2) | 67 | return project_url.group(2) |
68 | 68 | ||
69 | 69 | ||