aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-11-16 18:34:26 -0800
committerRobert Yang <liezhi.yang@windriver.com>2016-12-21 06:18:56 +0000
commit953f055b1f99a25660900f2aa08ba707f1476e00 (patch)
treefa3f5144fdb86cf656583fd02a8cb7abf74db81f
parent60a58a2c83ad7383816a2fcd34f4022b26e36d53 (diff)
downloadopenembedded-core-contrib-953f055b1f99a25660900f2aa08ba707f1476e00.tar.gz
oeqa/oetest.py: add hasLockedSig()
It checks whether there is a "recipe:do_populate_sysroot:" in locked-sigs.inc, which will help to determine whether the testcase will run or not. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/lib/oeqa/oetest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index d1aef967e4..9e6fcf1a55 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -171,6 +171,12 @@ class oeSDKExtTest(oeSDKTest):
return subprocess.check_output(". %s > /dev/null;"\
" %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
+ @classmethod
+ def hasLockedSig(self, recipe):
+ if re.search(" " + recipe + ":do_populate_sysroot:", oeTest.tc.locked_sigs):
+ return True
+ return False
+
def getmodule(pos=2):
# stack returns a list of tuples containg frame information
# First element of the list the is current frame, caller is 1
@@ -708,6 +714,13 @@ class SDKExtTestContext(SDKTestContext):
self.sdkextfilesdir = os.path.join(os.path.dirname(os.path.abspath(
oeqa.sdkext.__file__)), "files")
+ self.locked_sig_file = os.path.join(self.sdktestdir, "tc/conf/locked-sigs.inc")
+ if os.path.exists(self.locked_sig_file):
+ with open(self.locked_sig_file) as f:
+ self.locked_sigs = f.read()
+ else:
+ bb.fatal("%s not found. Did you build the ext sdk image?\n%s" % e)
+
def _get_test_namespace(self):
if self.cm:
return "sdk"