diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-10-13 17:10:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-10-30 13:39:51 +0000 |
commit | 2837b110ae8fd5ff0ca3ac5959cadb7d4a5ce6cc (patch) | |
tree | fca7aba2e90cbcb6f3b11a90bb00665850fa2460 /bitbake/lib/toaster/bldcontrol/tests.py | |
parent | a0660718e6599538dd65cadadbc04c6adc951b57 (diff) | |
download | poky-2837b110ae8fd5ff0ca3ac5959cadb7d4a5ce6cc.tar.gz |
bitbake: toaster: change startup parameter passing to avoid race
We avoid a race between the setting the TOASTER_BRBE variable
and reading the variable in toaster ui by supplying the variable
at server startup time through the toaster.conf post-read file.
Additional small changes are included, including marking the
build request with the environment id of where the build took place.
(Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/tests.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/tests.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index 4577c3f03b..65e337a31b 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py | |||
@@ -44,7 +44,7 @@ class BEControllerTests(object): | |||
44 | 44 | ||
45 | # test start server and stop | 45 | # test start server and stop |
46 | self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Port already occupied") | 46 | self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Port already occupied") |
47 | bc.startBBServer() | 47 | bc.startBBServer("0:0") |
48 | self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Server not answering") | 48 | self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Server not answering") |
49 | 49 | ||
50 | bc.stopBBServer() | 50 | bc.stopBBServer() |
@@ -57,14 +57,8 @@ class BEControllerTests(object): | |||
57 | bc = self._getBEController(obe) | 57 | bc = self._getBEController(obe) |
58 | bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) # setting layers, skip any layer info | 58 | bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) # setting layers, skip any layer info |
59 | 59 | ||
60 | bbc = bc.getBBController() | 60 | bbc = bc.getBBController("%d:%d" % (-1, obe.pk)) |
61 | self.assertTrue(isinstance(bbc, BitbakeController)) | 61 | self.assertTrue(isinstance(bbc, BitbakeController)) |
62 | # test set variable, use no build marker -1 for BR value | ||
63 | try: | ||
64 | bbc.setVariable("TOASTER_BRBE", "%d:%d" % (-1, obe.pk)) | ||
65 | except Exception as e : | ||
66 | self.fail("setVariable raised %s", e) | ||
67 | |||
68 | bc.stopBBServer() | 62 | bc.stopBBServer() |
69 | 63 | ||
70 | self._serverForceStop(bc) | 64 | self._serverForceStop(bc) |