[oe-commits] [openembedded-core] 02/07: XXX esdk testimage WIP
git at git.openembedded.org
git at git.openembedded.org
Wed Mar 1 03:46:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 7e8fdb449169386bd3661100bb3750d2a9e0d2b9
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Feb 27 23:46:10 2017 +0000
XXX esdk testimage WIP
---
meta/lib/oeqa/sdkext/case.py | 2 +-
meta/lib/oeqa/sdkext/cases/devtool.py | 63 ++++++++++++++++-------------------
2 files changed, 30 insertions(+), 35 deletions(-)
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
index 6f708aa..21b7188 100644
--- a/meta/lib/oeqa/sdkext/case.py
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -18,4 +18,4 @@ class OESDKExtTestCase(OESDKTestCase):
return subprocess.check_output(". %s > /dev/null;"\
" %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
- shell=True, env=env).decode("utf-8")
+ shell=True, env=env, universal_newlines=True)
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index baa528f..4723007 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -12,6 +12,8 @@ from oeqa.core.decorator.data import skipIfNotDataVar
class DevtoolTest(OESDKExtTestCase):
@classmethod
def setUpClass(self):
+ self._run('devtool install-sdk meta-extsdk-toolchain')
+
self.myapp_src = os.path.join(self.tc.esdk_files_dir, "myapp")
self.myapp_dst = os.path.join(self.tc.sdk_dir, "myapp")
shutil.copytree(self.myapp_src, self.myapp_dst)
@@ -20,99 +22,92 @@ class DevtoolTest(OESDKExtTestCase):
self.myapp_cmake_dst = os.path.join(self.tc.sdk_dir, "myapp_cmake")
shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
+ @classmethod
+ def tearDownClass(self):
+ shutil.rmtree(self.myapp_dst)
+ shutil.rmtree(self.myapp_cmake_dst)
+
def _test_devtool_build(self, directory):
self._run('devtool add myapp %s' % directory)
try:
self._run('devtool build myapp')
- except Exception as e:
+ except subprocess.CalledProcessError as e:
print(e.output)
- self._run('devtool reset myapp')
raise e
- self._run('devtool reset 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')
- except Exception as e:
+ except subprocess.CalledProcessError as e:
print(e.output)
- self._run('devtool reset myapp')
raise e
- self._run('devtool reset 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'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_make(self):
self._test_devtool_build(self.myapp_dst)
-
+
@OETestID(1606)
@OETestDepends(['test_devtool_location'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_esdk_package(self):
self._test_devtool_build_package(self.myapp_dst)
@OETestID(1607)
@OETestDepends(['test_devtool_location'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_cmake(self):
self._test_devtool_build(self.myapp_cmake_dst)
-
+
@OETestID(1608)
@OETestDepends(['test_devtool_location'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_extend_autotools_recipe_creation(self):
- req = 'https://github.com/rdfa/librdfa'
- recipe = "librdfa"
- self._run('devtool add %s %s' % (recipe, req) )
try:
- self._run('devtool build %s' % recipe)
- except Exception as e:
+ self._run('devtool sdk-install libxml2')
+ self._run('devtool add librdfa https://github.com/rdfa/librdfa')
+ self._run('devtool build librdfa')
+ except subprocess.CalledProcessError as e:
print(e.output)
- self._run('devtool reset %s' % recipe)
raise e
- self._run('devtool reset %s' % recipe)
+ finally:
+ self._run('devtool reset librdfa')
@OETestID(1609)
@OETestDepends(['test_devtool_location'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
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)
- except Exception as e:
+ except subprocess.CalledProcessError as e:
print(e.output)
- self._run('devtool reset %s' % recipe)
raise e
- self._run('devtool reset %s' % recipe)
+ finally:
+ self._run('devtool reset %s' % recipe)
@OETestID(1610)
@OETestDepends(['test_devtool_location'])
- @skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
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)
- except Exception as e:
+ except subprocess.CalledProcessError as e:
print(e.output)
- self._run('devtool reset %s' % package_nodejs)
raise e
- self._run('devtool reset %s '% package_nodejs)
-
- @classmethod
- def tearDownClass(self):
- shutil.rmtree(self.myapp_dst)
- shutil.rmtree(self.myapp_cmake_dst)
+ finally:
+ self._run('devtool reset %s '% package_nodejs)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list