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.bur...@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.mu...@intel.com<mailto:george.l.mu...@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
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to