diff options
-rw-r--r-- | bitbake/lib/bb/tests/runqueue.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/runqueue.py b/bitbake/lib/bb/tests/runqueue.py index 50b3392bc1..5e6439156d 100644 --- a/bitbake/lib/bb/tests/runqueue.py +++ b/bitbake/lib/bb/tests/runqueue.py | |||
@@ -12,6 +12,7 @@ import os | |||
12 | import tempfile | 12 | import tempfile |
13 | import subprocess | 13 | import subprocess |
14 | import sys | 14 | import sys |
15 | import time | ||
15 | 16 | ||
16 | # | 17 | # |
17 | # TODO: | 18 | # TODO: |
@@ -257,6 +258,8 @@ class RunQueueTests(unittest.TestCase): | |||
257 | 'a1:package_write_ipk_setscene', 'a1:package_qa_setscene'] | 258 | 'a1:package_write_ipk_setscene', 'a1:package_qa_setscene'] |
258 | self.assertEqual(set(tasks), set(expected)) | 259 | self.assertEqual(set(tasks), set(expected)) |
259 | 260 | ||
261 | self.shutdown(tempdir) | ||
262 | |||
260 | @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') | 263 | @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') |
261 | def test_hashserv_double(self): | 264 | def test_hashserv_double(self): |
262 | with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: | 265 | with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir: |
@@ -280,6 +283,7 @@ class RunQueueTests(unittest.TestCase): | |||
280 | 'a1:package_write_rpm_setscene', 'b1:package_write_ipk_setscene', 'a1:packagedata_setscene'] | 283 | 'a1:package_write_rpm_setscene', 'b1:package_write_ipk_setscene', 'a1:packagedata_setscene'] |
281 | self.assertEqual(set(tasks), set(expected)) | 284 | self.assertEqual(set(tasks), set(expected)) |
282 | 285 | ||
286 | self.shutdown(tempdir) | ||
283 | 287 | ||
284 | @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') | 288 | @unittest.skipIf(sys.version_info < (3, 5, 0), 'Python 3.5 or later required') |
285 | def test_hashserv_multiple_setscene(self): | 289 | def test_hashserv_multiple_setscene(self): |
@@ -309,3 +313,11 @@ class RunQueueTests(unittest.TestCase): | |||
309 | for i in expected: | 313 | for i in expected: |
310 | self.assertEqual(tasks.count(i), 1, "%s not in task list once" % i) | 314 | self.assertEqual(tasks.count(i), 1, "%s not in task list once" % i) |
311 | 315 | ||
316 | self.shutdown(tempdir) | ||
317 | |||
318 | def shutdown(self, tempdir): | ||
319 | # Wait for the hashserve socket to disappear else we'll see races with the tempdir cleanup | ||
320 | while os.path.exists(tempdir + "/hashserve.sock"): | ||
321 | time.sleep(0.5) | ||
322 | |||
323 | |||