[OE-core] [PATCH] oeqa/testimage: Add ability to run single test from suite.
Musat, George L
george.l.musat at intel.com
Mon Sep 28 14:39:08 UTC 2015
The thing is by the time tc.testlist is iterated, “oeqa.runtime.” is appended before every parameter in TEST_SUITES so I try to find out if it’s a filename.class.test format and truncate it as you said. Thanks for the input. Will do the changes.
From: Burton, Ross [mailto:ross.burton at intel.com]
Sent: Monday, September 28, 2015 5:29 PM
To: Musat, George L
Cc: OE-core
Subject: Re: [OE-core] [PATCH] oeqa/testimage: Add ability to run single test from suite.
On 28 September 2015 at 12:47, Lucian Musat <george.l.musat at intel.com<mailto:george.l.musat at intel.com>> wrote:
@@ -172,6 +176,7 @@ def exportTests(d,tc):
+ from re import search as re_search
Just import re and then do re.search - it's the same number of characters when calling and it's obvious what you're calling then.
for t in tc.testslist:
+ if re_search("\w+\.\w+\.test_\S+", t):
+ t = t.split('.')[0]+'.'+t.split('.')[1]+'.'+t.split('.')[2]
Not sure I understand what this is meant to be doing. If t matches [alphanumerics].[alphanumerics].test_[not whitespace] repeatedly split t on dots and re-join it back together with dots. For the example of filename.class.test_method doesn't this reconstruct the input? If you're attempting to truncate to the first three elements, then something like '.'.join(t.split('.')[:3]) is much more efficient and Pythonic.
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150928/195b6eef/attachment-0002.html>
More information about the Openembedded-core
mailing list