[OE-core] [PATCH] oeqa/testimage: Add ability to run single test from suite.

Burton, Ross ross.burton at intel.com
Mon Sep 28 14:28:51 UTC 2015


On 28 September 2015 at 12:47, Lucian Musat <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/078597d1/attachment-0002.html>


More information about the Openembedded-core mailing list