summaryrefslogtreecommitdiffstats
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:22:22 +0100
commit84d854c98bd201f3e92e440c1d9a64ba4f31e6da (patch)
tree074a8f869dfbfd61824a62ea5e63e3295023ba5f /meta/lib/oeqa/oetest.py
parent2d565fae46125d2d4016e7eead1a9043808d0cf9 (diff)
downloadpoky-84d854c98bd201f3e92e440c1d9a64ba4f31e6da.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] (From OE-Core rev: 928e0eecdb126f7d0bacd05b7057fc825e0d8f05) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
397 def __init__(self, d, target, exported=False): 397 def __init__(self, d, target, exported=False):
398 super(RuntimeTestContext, self).__init__(d, exported) 398 super(RuntimeTestContext, self).__init__(d, exported)
399 399
400 self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
401
402 self.target = target 400 self.target = target
403 401
404 self.pkgmanifest = {} 402 self.pkgmanifest = {}
@@ -598,6 +596,8 @@ class ImageTestContext(RuntimeTestContext):
598 def __init__(self, d, target, host_dumper): 596 def __init__(self, d, target, host_dumper):
599 super(ImageTestContext, self).__init__(d, target) 597 super(ImageTestContext, self).__init__(d, target)
600 598
599 self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
600
601 self.host_dumper = host_dumper 601 self.host_dumper = host_dumper
602 602
603 self.sigterm = False 603 self.sigterm = False
@@ -618,8 +618,18 @@ class ImageTestContext(RuntimeTestContext):
618 super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install) 618 super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
619 619
620class ExportTestContext(RuntimeTestContext): 620class ExportTestContext(RuntimeTestContext):
621 def __init__(self, d, target, exported=False): 621 def __init__(self, d, target, exported=False, parsedArgs={}):
622 """
623 This class is used when exporting tests and when are executed outside OE environment.
624
625 parsedArgs can contain the following:
626 - tag: Filter test by tag.
627 """
622 super(ExportTestContext, self).__init__(d, target, exported) 628 super(ExportTestContext, self).__init__(d, target, exported)
629
630 tag = parsedArgs.get("tag", None)
631 self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS", True)
632
623 self.sigterm = None 633 self.sigterm = None
624 634
625 def install_uninstall_packages(self, test_id, install=True): 635 def install_uninstall_packages(self, test_id, install=True):