diff options
| -rw-r--r-- | meta/lib/oeqa/oetest.py | 16 | ||||
| -rwxr-xr-x | meta/lib/oeqa/runexported.py | 6 |
2 files changed, 18 insertions, 4 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 | ||
| 620 | class ExportTestContext(RuntimeTestContext): | 620 | class 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): |
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py index 125e86d0e6..7e245c4120 100755 --- a/meta/lib/oeqa/runexported.py +++ b/meta/lib/oeqa/runexported.py | |||
| @@ -81,6 +81,7 @@ def main(): | |||
| 81 | specified in the json if that directory actually exists or it will error out.") | 81 | specified in the json if that directory actually exists or it will error out.") |
| 82 | parser.add_argument("-l", "--log-dir", dest="log_dir", help="This sets the path for TEST_LOG_DIR. If not specified \ | 82 | parser.add_argument("-l", "--log-dir", dest="log_dir", help="This sets the path for TEST_LOG_DIR. If not specified \ |
| 83 | the current dir is used. This is used for usually creating a ssh log file and a scp test file.") | 83 | the current dir is used. This is used for usually creating a ssh log file and a scp test file.") |
| 84 | parser.add_argument("-a", "--tag", dest="tag", help="Only run test with specified tag.") | ||
| 84 | parser.add_argument("json", help="The json file exported by the build system", default="testdata.json", nargs='?') | 85 | parser.add_argument("json", help="The json file exported by the build system", default="testdata.json", nargs='?') |
| 85 | 86 | ||
| 86 | args = parser.parse_args() | 87 | args = parser.parse_args() |
| @@ -107,6 +108,9 @@ def main(): | |||
| 107 | if not os.path.isdir(d["DEPLOY_DIR"]): | 108 | if not os.path.isdir(d["DEPLOY_DIR"]): |
| 108 | print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"]) | 109 | print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"]) |
| 109 | 110 | ||
| 111 | parsedArgs = {} | ||
| 112 | parsedArgs["tag"] = args.tag | ||
| 113 | |||
| 110 | extract_sdk(d) | 114 | extract_sdk(d) |
| 111 | 115 | ||
| 112 | target = FakeTarget(d) | 116 | target = FakeTarget(d) |
| @@ -114,7 +118,7 @@ def main(): | |||
| 114 | setattr(target, key, loaded["target"][key]) | 118 | setattr(target, key, loaded["target"][key]) |
| 115 | 119 | ||
| 116 | target.exportStart() | 120 | target.exportStart() |
| 117 | tc = ExportTestContext(d, target, True) | 121 | tc = ExportTestContext(d, target, True, parsedArgs) |
| 118 | tc.loadTests() | 122 | tc.loadTests() |
| 119 | tc.runTests() | 123 | tc.runTests() |
| 120 | 124 | ||
