diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 18:27:11 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-13 05:51:39 +0300 |
commit | 6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch) | |
tree | f12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py | |
parent | 509842add85b53e13164c1569a1fd43d5b8d91c5 (diff) | |
download | openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.xz |
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro).
Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py')
-rw-r--r-- | import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py new file mode 100644 index 000000000..a01bc0bfe --- /dev/null +++ b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/cases/devtool.py @@ -0,0 +1,97 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +import shutil +import subprocess + +from oeqa.sdkext.case import OESDKExtTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.oeid import OETestID + +class DevtoolTest(OESDKExtTestCase): + @classmethod + def setUpClass(cls): + myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp") + cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp") + shutil.copytree(myapp_src, cls.myapp_dst) + + myapp_cmake_src = os.path.join(cls.tc.esdk_files_dir, "myapp_cmake") + cls.myapp_cmake_dst = os.path.join(cls.tc.sdk_dir, "myapp_cmake") + shutil.copytree(myapp_cmake_src, cls.myapp_cmake_dst) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.myapp_dst) + shutil.rmtree(cls.myapp_cmake_dst) + + def _test_devtool_build(self, directory): + self._run('devtool add myapp %s' % directory) + try: + self._run('devtool build myapp') + finally: + self._run('devtool reset myapp') + + def _test_devtool_build_package(self, directory): + self._run('devtool add myapp %s' % directory) + try: + self._run('devtool package myapp') + finally: + self._run('devtool reset myapp') + + def test_devtool_location(self): + output = self._run('which devtool') + self.assertEqual(output.startswith(self.tc.sdk_dir), True, \ + msg="Seems that devtool isn't the eSDK one: %s" % output) + + @OETestDepends(['test_devtool_location']) + def test_devtool_add_reset(self): + self._run('devtool add myapp %s' % self.myapp_dst) + self._run('devtool reset myapp') + + @OETestID(1605) + @OETestDepends(['test_devtool_location']) + def test_devtool_build_make(self): + self._test_devtool_build(self.myapp_dst) + + @OETestID(1606) + @OETestDepends(['test_devtool_location']) + def test_devtool_build_esdk_package(self): + self._test_devtool_build_package(self.myapp_dst) + + @OETestID(1607) + @OETestDepends(['test_devtool_location']) + def test_devtool_build_cmake(self): + self._test_devtool_build(self.myapp_cmake_dst) + + @OETestID(1608) + @OETestDepends(['test_devtool_location']) + def test_extend_autotools_recipe_creation(self): + req = 'https://github.com/rdfa/librdfa' + recipe = "librdfa" + self._run('devtool sdk-install libxml2') + self._run('devtool add %s %s' % (recipe, req) ) + try: + self._run('devtool build %s' % recipe) + finally: + self._run('devtool reset %s' % recipe) + + @OETestID(1609) + @OETestDepends(['test_devtool_location']) + def test_devtool_kernelmodule(self): + docfile = 'https://github.com/umlaeute/v4l2loopback.git' + recipe = 'v4l2loopback-driver' + self._run('devtool add %s %s' % (recipe, docfile) ) + try: + self._run('devtool build %s' % recipe) + finally: + self._run('devtool reset %s' % recipe) + + @OETestID(1610) + @OETestDepends(['test_devtool_location']) + def test_recipes_for_nodejs(self): + package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0" + self._run('devtool add %s ' % package_nodejs) + try: + self._run('devtool build %s ' % package_nodejs) + finally: + self._run('devtool reset %s '% package_nodejs) |