diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-03-02 21:26:54 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-07 17:23:03 +0000 |
commit | 790b2d1387a150b85612ad38a53bab788154e4bb (patch) | |
tree | d4d2820e945ec16ab07e680563475beb6b425cc9 /bitbake/lib/toaster/bldcontrol/tests.py | |
parent | 96535ba720b2e2afe27ff2454d5b6031624ab7ab (diff) | |
download | poky-790b2d1387a150b85612ad38a53bab788154e4bb.tar.gz |
bitbake: toaster: raise NotImplementedError
Raised NotImplementedError instead of Exception to be
able to catch it.
This is a preparation for removing sshbecontroller module.
It has to be done as code in bldcontrol/tests.py imports custom
NotImplementedException from sshbecontroller.
(Bitbake rev: c243ab6c83fe12d84777e4c3a18fd393827b9327)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.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 | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index 141b42acbc..e8089914b7 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py | |||
@@ -48,13 +48,12 @@ class BEControllerTests(object): | |||
48 | self.assertTrue(err == '', "bitbake server pid %s not stopped" % err) | 48 | self.assertTrue(err == '', "bitbake server pid %s not stopped" % err) |
49 | 49 | ||
50 | def test_serverStartAndStop(self): | 50 | def test_serverStartAndStop(self): |
51 | from bldcontrol.sshbecontroller import NotImplementedException | ||
52 | obe = self._getBuildEnvironment() | 51 | obe = self._getBuildEnvironment() |
53 | bc = self._getBEController(obe) | 52 | bc = self._getBEController(obe) |
54 | try: | 53 | try: |
55 | # setting layers, skip any layer info | 54 | # setting layers, skip any layer info |
56 | bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) | 55 | bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) |
57 | except NotImplementedException, e: | 56 | except NotImplementedError: |
58 | print "Test skipped due to command not implemented yet" | 57 | print "Test skipped due to command not implemented yet" |
59 | return True | 58 | return True |
60 | # We are ok with the exception as we're handling the git already exists | 59 | # We are ok with the exception as we're handling the git already exists |
@@ -74,14 +73,13 @@ class BEControllerTests(object): | |||
74 | self._serverForceStop(bc) | 73 | self._serverForceStop(bc) |
75 | 74 | ||
76 | def test_getBBController(self): | 75 | def test_getBBController(self): |
77 | from bldcontrol.sshbecontroller import NotImplementedException | ||
78 | obe = self._getBuildEnvironment() | 76 | obe = self._getBuildEnvironment() |
79 | bc = self._getBEController(obe) | 77 | bc = self._getBEController(obe) |
80 | layerSet = False | 78 | layerSet = False |
81 | try: | 79 | try: |
82 | # setting layers, skip any layer info | 80 | # setting layers, skip any layer info |
83 | layerSet = bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) | 81 | layerSet = bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) |
84 | except NotImplementedException: | 82 | except NotImplementedError: |
85 | print "Test skipped due to command not implemented yet" | 83 | print "Test skipped due to command not implemented yet" |
86 | return True | 84 | return True |
87 | # We are ok with the exception as we're handling the git already exists | 85 | # We are ok with the exception as we're handling the git already exists |