[oe-commits] [openembedded-core] 04/07: hacks
git at git.openembedded.org
git at git.openembedded.org
Wed Mar 1 03:46:15 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 a8df6ac64649980f3f0865b3420c1d0d8aaf68ae
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Feb 28 16:31:55 2017 +0000
hacks
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/sdkext/case.py | 6 +++++-
meta/lib/oeqa/sdkext/cases/devtool.py | 11 ++++++++---
meta/lib/oeqa/sdkext/cases/sdk_update.py | 12 ++++++++++++
scripts/lib/devtool/sdk.py | 4 ++++
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
index 21b7188..905b730 100644
--- a/meta/lib/oeqa/sdkext/case.py
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -16,6 +16,10 @@ class OESDKExtTestCase(OESDKTestCase):
paths_to_avoid = ['bitbake/bin', 'poky/scripts']
env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
- return subprocess.check_output(". %s > /dev/null;"\
+ try:
+ return subprocess.check_output(". %s > /dev/null;"\
" %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
shell=True, env=env, universal_newlines=True)
+ except subprocess.CalledProcessError as e:
+ print(e.output)
+ raise
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py
index 94a7d08..93b00a9 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -3,6 +3,7 @@
import shutil
import subprocess
+import glob
from oeqa.sdkext.case import OESDKExtTestCase
from oeqa.core.decorator.depends import OETestDepends
@@ -16,11 +17,15 @@ class DevtoolTest(OESDKExtTestCase):
assert(sstate_dir)
cls.http_service = HTTPService(sstate_dir)
- #cls.http_service.start()
+ 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://.* http://%s/PATH"' % url)
+ 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")
@@ -38,7 +43,7 @@ class DevtoolTest(OESDKExtTestCase):
def setUp(self):
# TODO no run in class context so can't do this in setUpClass
- self._run('devtool install-sdk meta-extsdk-toolchain')
+ self._run('devtool sdk-install meta-extsdk-toolchain')
def _test_devtool_build(self, directory):
self._run('devtool add myapp %s' % directory)
diff --git a/meta/lib/oeqa/sdkext/cases/sdk_update.py b/meta/lib/oeqa/sdkext/cases/sdk_update.py
index 2f8598b..ca1f654 100644
--- a/meta/lib/oeqa/sdkext/cases/sdk_update.py
+++ b/meta/lib/oeqa/sdkext/cases/sdk_update.py
@@ -11,11 +11,22 @@ 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
@@ -36,4 +47,5 @@ class SdkUpdateTest(OESDKExtTestCase):
@classmethod
def tearDownClass(self):
self.http_service.stop()
+ self.http_service.stop()
shutil.rmtree(self.publish_dir)
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index f629db1..6669621 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -260,7 +260,11 @@ def sdk_install(args, config, basepath, workspace):
def checkstamp(recipe):
stampprefix = stampprefixes[recipe]
stamps = glob.glob(stampprefix + '*')
+ print(str(recipe))
+ print(str(stampprefix))
+ print(str(stamps))
for stamp in stamps:
+ print(str(stamp))
if '.sigdata.' not in stamp and stamp.startswith((stampprefix + '.', stampprefix + '_setscene.')):
return True
else:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list