aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/oetest.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-07-04 12:23:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-04 15:05:47 +0100
commit928e0eecdb126f7d0bacd05b7057fc825e0d8f05 (patch)
treea652c7906cb7cdf4baf2df60341c16b849f8a142 /meta/lib/oeqa/oetest.py
parent3442ee423813d547be7899a25ea31efe719e662f (diff)
downloadopenembedded-core-contrib-928e0eecdb126f7d0bacd05b7057fc825e0d8f05.tar.gz
oetest.py: Add command line parameter support for tag in testexport
This allows to use a command line argument to change the tag used to filter test instead of rebuilding the tests. [YOCTO #8532] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r--meta/lib/oeqa/oetest.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index e63ca56165..9132a19319 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -397,8 +397,6 @@ class RuntimeTestContext(TestContext):
def __init__(self, d, target, exported=False):
super(RuntimeTestContext, self).__init__(d, exported)
- self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
-
self.target = target
self.pkgmanifest = {}
@@ -598,6 +596,8 @@ class ImageTestContext(RuntimeTestContext):
def __init__(self, d, target, host_dumper):
super(ImageTestContext, self).__init__(d, target)
+ self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
+
self.host_dumper = host_dumper
self.sigterm = False
@@ -618,8 +618,18 @@ class ImageTestContext(RuntimeTestContext):
super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
class ExportTestContext(RuntimeTestContext):
- def __init__(self, d, target, exported=False):
+ def __init__(self, d, target, exported=False, parsedArgs={}):
+ """
+ This class is used when exporting tests and when are executed outside OE environment.
+
+ parsedArgs can contain the following:
+ - tag: Filter test by tag.
+ """
super(ExportTestContext, self).__init__(d, target, exported)
+
+ tag = parsedArgs.get("tag", None)
+ self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS", True)
+
self.sigterm = None
def install_uninstall_packages(self, test_id, install=True):