[oe-commits] [openembedded-core] 18/37: oeqa/sdkext/cases: Move sdk_update test into devtool module
git at git.openembedded.org
git at git.openembedded.org
Fri May 26 21:00:11 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 1b93b9c401281bb688eeda16c66af5ff0ed1028c
Author: Aníbal Limón <anibal.limon at linux.intel.com>
AuthorDate: Fri May 26 15:37:42 2017 -0500
oeqa/sdkext/cases: Move sdk_update test into devtool module
With the new OEQA thread support there are problems running
devtool twice at the same time because only one instance of
bitbake/devtool is allowed.
[YOCTO #11450]
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/sdkext/cases/devtool.py | 32 ++++++++++++++++++++++++++
meta/lib/oeqa/sdkext/cases/sdk_update.py | 39 --------------------------------
2 files changed, 32 insertions(+), 39 deletions(-)
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index a01bc0b..ea90517 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -1,12 +1,14 @@
# Copyright (C) 2016 Intel Corporation
# Released under the MIT license (see COPYING.MIT)
+import os
import shutil
import subprocess
from oeqa.sdkext.case import OESDKExtTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.utils.httpserver import HTTPService
class DevtoolTest(OESDKExtTestCase):
@classmethod
@@ -95,3 +97,33 @@ class DevtoolTest(OESDKExtTestCase):
self._run('devtool build %s ' % package_nodejs)
finally:
self._run('devtool reset %s '% package_nodejs)
+
+class SdkUpdateTest(OESDKExtTestCase):
+ @classmethod
+ def setUpClass(self):
+ 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
+ if not os.path.exists(tcname_new):
+ tcname_new = "%s.sh" % base_tcname
+
+ cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
+ subprocess.check_output(cmd, shell=True)
+
+ self.http_service = HTTPService(self.publish_dir)
+ self.http_service.start()
+
+ self.http_url = "http://127.0.0.1:%d" % self.http_service.port
+
+ def test_sdk_update_http(self):
+ output = self._run("devtool sdk-update \"%s\"" % self.http_url)
+
+ @classmethod
+ def tearDownClass(self):
+ self.http_service.stop()
+ shutil.rmtree(self.publish_dir)
diff --git a/meta/lib/oeqa/sdkext/cases/sdk_update.py b/meta/lib/oeqa/sdkext/cases/sdk_update.py
deleted file mode 100644
index 2f8598b..0000000
--- a/meta/lib/oeqa/sdkext/cases/sdk_update.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2016 Intel Corporation
-# Released under the MIT license (see COPYING.MIT)
-
-import os
-import shutil
-import subprocess
-
-from oeqa.sdkext.case import OESDKExtTestCase
-from oeqa.utils.httpserver import HTTPService
-
-class SdkUpdateTest(OESDKExtTestCase):
- @classmethod
- def setUpClass(self):
- 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
- if not os.path.exists(tcname_new):
- tcname_new = "%s.sh" % base_tcname
-
- cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
- subprocess.check_output(cmd, shell=True)
-
- self.http_service = HTTPService(self.publish_dir)
- self.http_service.start()
-
- self.http_url = "http://127.0.0.1:%d" % self.http_service.port
-
- def test_sdk_update_http(self):
- output = self._run("devtool sdk-update \"%s\"" % self.http_url)
-
- @classmethod
- def tearDownClass(self):
- self.http_service.stop()
- shutil.rmtree(self.publish_dir)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list