diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-11-30 10:35:52 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:19 +0000 |
commit | 55f05fab2b2b72b3e254ff02c1e294d53691a1fc (patch) | |
tree | bc8499111780cf799e2baa4b2b7e95c334d5fd7a /meta/lib/oeqa/sdkext/cases/sdk_update.py | |
parent | 3fac2417ddfffb8b32a821ae4b53fabfbb48a8fa (diff) | |
download | poky-55f05fab2b2b72b3e254ff02c1e294d53691a1fc.tar.gz |
oeqa/sdkext: Move test cases inside cases directory
For match with the new structure of the OEQA framework.
In the new framework Test component base directory in this case
sdk module will contain case and context implementations.
[YOCTO #10599]
(From OE-Core rev: bdb92fa4d9bd2e4a0a14e3adc62a6b9e9bf639d3)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdkext/cases/sdk_update.py')
-rw-r--r-- | meta/lib/oeqa/sdkext/cases/sdk_update.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdkext/cases/sdk_update.py b/meta/lib/oeqa/sdkext/cases/sdk_update.py new file mode 100644 index 0000000000..2ade839c05 --- /dev/null +++ b/meta/lib/oeqa/sdkext/cases/sdk_update.py | |||
@@ -0,0 +1,36 @@ | |||
1 | import os | ||
2 | import shutil | ||
3 | import subprocess | ||
4 | |||
5 | from oeqa.oetest import oeSDKExtTest | ||
6 | from oeqa.utils.httpserver import HTTPService | ||
7 | |||
8 | class SdkUpdateTest(oeSDKExtTest): | ||
9 | |||
10 | @classmethod | ||
11 | def setUpClass(self): | ||
12 | self.publish_dir = os.path.join(self.tc.sdktestdir, 'esdk_publish') | ||
13 | if os.path.exists(self.publish_dir): | ||
14 | shutil.rmtree(self.publish_dir) | ||
15 | os.mkdir(self.publish_dir) | ||
16 | |||
17 | tcname_new = self.tc.d.expand( | ||
18 | "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}-new.sh") | ||
19 | if not os.path.exists(tcname_new): | ||
20 | tcname_new = self.tc.tcname | ||
21 | |||
22 | cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir) | ||
23 | subprocess.check_output(cmd, shell=True) | ||
24 | |||
25 | self.http_service = HTTPService(self.publish_dir) | ||
26 | self.http_service.start() | ||
27 | |||
28 | self.http_url = "http://127.0.0.1:%d" % self.http_service.port | ||
29 | |||
30 | def test_sdk_update_http(self): | ||
31 | output = self._run("devtool sdk-update \"%s\"" % self.http_url) | ||
32 | |||
33 | @classmethod | ||
34 | def tearDownClass(self): | ||
35 | self.http_service.stop() | ||
36 | shutil.rmtree(self.publish_dir) | ||