* [PATCHv2 0/1] Add command line parameter support for tag in testexport
@ 2016-07-04 12:23 mariano.lopez
2016-07-04 12:23 ` [PATCHv2 1/1] oetest.py: " mariano.lopez
2016-07-06 16:36 ` [PATCHv2 0/1] " Benjamin Esquivel
0 siblings, 2 replies; 3+ messages in thread
From: mariano.lopez @ 2016-07-04 12:23 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
This allows to specify the tag to be used to filter test as an argument of
runexported.py.
Changes in v2:
- Use a specific dictionary instead of kwargs
The following changes since commit 5c11e365e19357f721c49d076971567e7b64b61b:
lib/oeqa: add Galculator to SDK and runtime tests (2016-07-01 16:22:48 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug8532v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug8532v2
Mariano Lopez (1):
oetest.py: Add command line parameter support for tag in testexport
meta/lib/oeqa/oetest.py | 16 +++++++++++++---
meta/lib/oeqa/runexported.py | 6 +++++-
2 files changed, 18 insertions(+), 4 deletions(-)
--
2.6.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCHv2 1/1] oetest.py: Add command line parameter support for tag in testexport
2016-07-04 12:23 [PATCHv2 0/1] Add command line parameter support for tag in testexport mariano.lopez
@ 2016-07-04 12:23 ` mariano.lopez
2016-07-06 16:36 ` [PATCHv2 0/1] " Benjamin Esquivel
1 sibling, 0 replies; 3+ messages in thread
From: mariano.lopez @ 2016-07-04 12:23 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
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>
---
meta/lib/oeqa/oetest.py | 16 +++++++++++++---
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 4a740fb..a63fd9b 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 = {}
@@ -592,6 +590,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
@@ -612,8 +612,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):
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 5886739..ae46225 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -81,6 +81,7 @@ def main():
specified in the json if that directory actually exists or it will error out.")
parser.add_argument("-l", "--log-dir", dest="log_dir", help="This sets the path for TEST_LOG_DIR. If not specified \
the current dir is used. This is used for usually creating a ssh log file and a scp test file.")
+ parser.add_argument("-a", "--tag", dest="tag", help="Only run test with specified tag.")
parser.add_argument("json", help="The json file exported by the build system", default="testdata.json", nargs='?')
args = parser.parse_args()
@@ -107,6 +108,9 @@ def main():
if not os.path.isdir(d["DEPLOY_DIR"]):
print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"])
+ parsedArgs = {}
+ parsedArgs["tag"] = args.tag
+
extract_sdk(d)
target = FakeTarget(d)
@@ -114,7 +118,7 @@ def main():
setattr(target, key, loaded["target"][key])
target.exportStart()
- tc = ExportTestContext(d, target, True)
+ tc = ExportTestContext(d, target, True, parsedArgs)
tc.loadTests()
tc.runTests()
--
2.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2 0/1] Add command line parameter support for tag in testexport
2016-07-04 12:23 [PATCHv2 0/1] Add command line parameter support for tag in testexport mariano.lopez
2016-07-04 12:23 ` [PATCHv2 1/1] oetest.py: " mariano.lopez
@ 2016-07-06 16:36 ` Benjamin Esquivel
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Esquivel @ 2016-07-06 16:36 UTC (permalink / raw)
To: mariano.lopez, openembedded-core
Looks good. Thanks for sending this.
Benjamin
On Mon, 2016-07-04 at 12:23 +0000, mariano.lopez@linux.intel.com wrote:
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
> This allows to specify the tag to be used to filter test as an
> argument of
> runexported.py.
>
> Changes in v2:
>
> - Use a specific dictionary instead of kwargs
>
> The following changes since commit
> 5c11e365e19357f721c49d076971567e7b64b61b:
>
> lib/oeqa: add Galculator to SDK and runtime tests (2016-07-01
> 16:22:48 +0100)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib mariano/bug8532v2
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bu
> g8532v2
>
> Mariano Lopez (1):
> oetest.py: Add command line parameter support for tag in testexport
>
> meta/lib/oeqa/oetest.py | 16 +++++++++++++---
> meta/lib/oeqa/runexported.py | 6 +++++-
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> --
> 2.6.6
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-06 16:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-04 12:23 [PATCHv2 0/1] Add command line parameter support for tag in testexport mariano.lopez
2016-07-04 12:23 ` [PATCHv2 1/1] oetest.py: " mariano.lopez
2016-07-06 16:36 ` [PATCHv2 0/1] " Benjamin Esquivel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox