From 2837b110ae8fd5ff0ca3ac5959cadb7d4a5ce6cc Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 13 Oct 2014 17:10:39 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/tests.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'bitbake/lib/toaster/bldcontrol/tests.py') 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): # test start server and stop self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Port already occupied") - bc.startBBServer() + bc.startBBServer("0:0") self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, 8200)), "Server not answering") bc.stopBBServer() @@ -57,14 +57,8 @@ class BEControllerTests(object): bc = self._getBEController(obe) bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) # setting layers, skip any layer info - bbc = bc.getBBController() + bbc = bc.getBBController("%d:%d" % (-1, obe.pk)) self.assertTrue(isinstance(bbc, BitbakeController)) - # test set variable, use no build marker -1 for BR value - try: - bbc.setVariable("TOASTER_BRBE", "%d:%d" % (-1, obe.pk)) - except Exception as e : - self.fail("setVariable raised %s", e) - bc.stopBBServer() self._serverForceStop(bc) -- cgit v1.2.3-54-g00ecf