Files
poky/meta/lib/oeqa/sdkext/devtool.py
Aníbal Limón e22fbce142 oeqa/sdkext/devtool.py: Add location test to ensure that devtool is the eSDK one.
(From OE-Core rev: 3e3abf0753a3bf1737dc4f476df4e70d31070391)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10 16:06:23 +00:00

33 lines
1.1 KiB
Python

import shutil
from oeqa.oetest import oeSDKExtTest
from oeqa.utils.decorators import *
class DevtoolTest(oeSDKExtTest):
@classmethod
def setUpClass(self):
self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
shutil.copytree(self.myapp_src, self.myapp_dst)
def test_devtool_location(self):
output = self._run('which devtool')
self.assertEqual(output.startswith(self.tc.sdktestdir), True, \
msg="Seems that devtool isn't the eSDK one: %s" % output)
@skipUnlessPassed('test_devtool_location')
def test_devtool_add_reset(self):
self._run('devtool add myapp %s' % self.myapp_dst)
self._run('devtool reset myapp')
@skipUnlessPassed('test_devtool_location')
def test_devtool_build(self):
self._run('devtool add myapp %s' % self.myapp_dst)
self._run('devtool build myapp')
self._run('devtool reset myapp')
@classmethod
def tearDownClass(self):
shutil.rmtree(self.myapp_dst)