[oe-commits] [openembedded-core] 08/09: fixups

git at git.openembedded.org git at git.openembedded.org
Wed Mar 1 01:27:06 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 f3cc699a4937b624cccb0c6f2da46e6d90a67ce7
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Mar 1 01:16:17 2017 +0000

    fixups
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/sdk/case.py                |  2 +-
 meta/lib/oeqa/sdk/cases/gcc.py           |  5 -----
 meta/lib/oeqa/sdkext/cases/devtool.py    | 19 -------------------
 meta/lib/oeqa/sdkext/cases/sdk_update.py | 11 -----------
 meta/lib/oeqa/sdkext/context.py          |  4 ++--
 5 files changed, 3 insertions(+), 38 deletions(-)

diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index 782db8b..963aa8d 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -9,4 +9,4 @@ class OESDKTestCase(OETestCase):
     def _run(self, cmd):
         return subprocess.check_output(". %s > /dev/null; %s;" % \
                 (self.tc.sdk_env, cmd), shell=True,
-                stderr=subprocess.STDOUT).decode("utf-8")
+                stderr=subprocess.STDOUT, universal_newlines=True)
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index 74ad2a2..d17ccd2 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -16,11 +16,6 @@ class GccCompileTest(OESDKTestCase):
             shutil.copyfile(os.path.join(files[f], f),
                     os.path.join(self.tc.sdk_dir, f))
 
-    def setUp(self):
-        machine = self.td.get("MACHINE")
-        if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine):
-            raise unittest.SkipTest("GccCompileTest class: SDK doesn't contain a cross-canadian toolchain")
-
     def test_gcc_compile(self):
         self._run('$CC %s/test.c -o %s/test -lm' % (self.tc.sdk_dir, self.tc.sdk_dir))
 
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index 93b00a9..e5aa93e 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -13,20 +13,6 @@ from oeqa.utils.httpserver import HTTPService
 class DevtoolTest(OESDKExtTestCase):
     @classmethod
     def setUpClass(cls):
-        sstate_dir = cls.td.get('SSTATE_DIR')
-        assert(sstate_dir)
-
-        cls.http_service = HTTPService(sstate_dir)
-        cls.http_service.start()
-
-        uninative = glob.glob(os.path.join(cls.tc.sdk_dir, 'downloads', 'uninative', '*', ''))[0]
-
-        with open(os.path.join(cls.tc.sdk_dir, 'conf', 'local.conf'), 'a+') as f:
-            url = "http://127.0.0.1:%d" % cls.http_service.port
-            f.write('SSTATE_MIRRORS = "file://.* %s/PATH"\n' % url)
-            f.write('DL_DIR = "/media/build3/sources"\n')
-            f.write('UNINATIVE_URL ?= "file://%s"\n' % uninative)
-
         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(cls.myapp_src, cls.myapp_dst)
@@ -37,14 +23,9 @@ class DevtoolTest(OESDKExtTestCase):
 
     @classmethod
     def tearDownClass(cls):
-        cls.http_service.stop()
         shutil.rmtree(cls.myapp_dst)
         shutil.rmtree(cls.myapp_cmake_dst)
 
-    def setUp(self):
-        # TODO no run in class context so can't do this in setUpClass
-        self._run('devtool sdk-install meta-extsdk-toolchain')
-
     def _test_devtool_build(self, directory):
         self._run('devtool add myapp %s' % directory)
         try:
diff --git a/meta/lib/oeqa/sdkext/cases/sdk_update.py b/meta/lib/oeqa/sdkext/cases/sdk_update.py
index ca1f654..7cf0b29 100644
--- a/meta/lib/oeqa/sdkext/cases/sdk_update.py
+++ b/meta/lib/oeqa/sdkext/cases/sdk_update.py
@@ -11,22 +11,12 @@ from oeqa.utils.httpserver import HTTPService
 class SdkUpdateTest(OESDKExtTestCase):
     @classmethod
     def setUpClass(self):
-        sstate_dir = self.td.get('SSTATE_DIR')
-        assert(sstate_dir)
-
-        self.http_sstate_service = HTTPService(sstate_dir)
-        self.http_sstate_service.start()
-
-        with open(os.path.join(self.tc.sdk_dir, 'conf', 'local.conf'), 'a+') as f:
-            url = "http://127.0.0.1:%d" % self.http_sstate_service.port
-            f.write('SSTATE_MIRRORS = "file://.* %s/PATH"\n' % url)
 
         self.publish_dir = os.path.join(self.tc.sdk_dir, 'esdk_publish')
         if os.path.exists(self.publish_dir):
             shutil.rmtree(self.publish_dir)
         os.mkdir(self.publish_dir)
 
-
         base_tcname = "%s/%s" % (self.td.get("SDK_DEPLOY", ''),
             self.td.get("TOOLCHAINEXT_OUTPUTNAME", ''))
         tcname_new = "%s-new.sh" % base_tcname
@@ -47,5 +37,4 @@ class SdkUpdateTest(OESDKExtTestCase):
     @classmethod
     def tearDownClass(self):
         self.http_service.stop()
-        self.http_service.stop()
         shutil.rmtree(self.publish_dir)
diff --git a/meta/lib/oeqa/sdkext/context.py b/meta/lib/oeqa/sdkext/context.py
index 8dbcd80..bee8c39 100644
--- a/meta/lib/oeqa/sdkext/context.py
+++ b/meta/lib/oeqa/sdkext/context.py
@@ -14,8 +14,8 @@ class OESDKExtTestContextExecutor(OESDKTestContextExecutor):
     help = 'esdk test component'
     description = 'executes esdk tests'
 
-    default_cases = [OESDKTestContextExecutor.default_cases[0],
-            os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]
+    default_cases = OESDKTestContextExecutor.default_cases + \
+            [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]
     default_test_data = None
 
 _executor_class = OESDKExtTestContextExecutor

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list