summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdkext
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdkext')
-rw-r--r--meta/lib/oeqa/sdkext/cases/devtool.py32
-rw-r--r--meta/lib/oeqa/sdkext/cases/sdk_update.py39
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 a01bc0bfe2..ea9051710a 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -1,12 +1,14 @@
1# Copyright (C) 2016 Intel Corporation 1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT) 2# Released under the MIT license (see COPYING.MIT)
3 3
4import os
4import shutil 5import shutil
5import subprocess 6import subprocess
6 7
7from oeqa.sdkext.case import OESDKExtTestCase 8from oeqa.sdkext.case import OESDKExtTestCase
8from oeqa.core.decorator.depends import OETestDepends 9from oeqa.core.decorator.depends import OETestDepends
9from oeqa.core.decorator.oeid import OETestID 10from oeqa.core.decorator.oeid import OETestID
11from oeqa.utils.httpserver import HTTPService
10 12
11class DevtoolTest(OESDKExtTestCase): 13class DevtoolTest(OESDKExtTestCase):
12 @classmethod 14 @classmethod
@@ -95,3 +97,33 @@ class DevtoolTest(OESDKExtTestCase):
95 self._run('devtool build %s ' % package_nodejs) 97 self._run('devtool build %s ' % package_nodejs)
96 finally: 98 finally:
97 self._run('devtool reset %s '% package_nodejs) 99 self._run('devtool reset %s '% package_nodejs)
100
101class SdkUpdateTest(OESDKExtTestCase):
102 @classmethod
103 def setUpClass(self):
104 self.publish_dir = os.path.join(self.tc.sdk_dir, 'esdk_publish')
105 if os.path.exists(self.publish_dir):
106 shutil.rmtree(self.publish_dir)
107 os.mkdir(self.publish_dir)
108
109 base_tcname = "%s/%s" % (self.td.get("SDK_DEPLOY", ''),
110 self.td.get("TOOLCHAINEXT_OUTPUTNAME", ''))
111 tcname_new = "%s-new.sh" % base_tcname
112 if not os.path.exists(tcname_new):
113 tcname_new = "%s.sh" % base_tcname
114
115 cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
116 subprocess.check_output(cmd, shell=True)
117
118 self.http_service = HTTPService(self.publish_dir)
119 self.http_service.start()
120
121 self.http_url = "http://127.0.0.1:%d" % self.http_service.port
122
123 def test_sdk_update_http(self):
124 output = self._run("devtool sdk-update \"%s\"" % self.http_url)
125
126 @classmethod
127 def tearDownClass(self):
128 self.http_service.stop()
129 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 2f8598bbe5..0000000000
--- a/meta/lib/oeqa/sdkext/cases/sdk_update.py
+++ /dev/null
@@ -1,39 +0,0 @@
1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4import os
5import shutil
6import subprocess
7
8from oeqa.sdkext.case import OESDKExtTestCase
9from oeqa.utils.httpserver import HTTPService
10
11class SdkUpdateTest(OESDKExtTestCase):
12 @classmethod
13 def setUpClass(self):
14 self.publish_dir = os.path.join(self.tc.sdk_dir, 'esdk_publish')
15 if os.path.exists(self.publish_dir):
16 shutil.rmtree(self.publish_dir)
17 os.mkdir(self.publish_dir)
18
19 base_tcname = "%s/%s" % (self.td.get("SDK_DEPLOY", ''),
20 self.td.get("TOOLCHAINEXT_OUTPUTNAME", ''))
21 tcname_new = "%s-new.sh" % base_tcname
22 if not os.path.exists(tcname_new):
23 tcname_new = "%s.sh" % base_tcname
24
25 cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
26 subprocess.check_output(cmd, shell=True)
27
28 self.http_service = HTTPService(self.publish_dir)
29 self.http_service.start()
30
31 self.http_url = "http://127.0.0.1:%d" % self.http_service.port
32
33 def test_sdk_update_http(self):
34 output = self._run("devtool sdk-update \"%s\"" % self.http_url)
35
36 @classmethod
37 def tearDownClass(self):
38 self.http_service.stop()
39 shutil.rmtree(self.publish_dir)