summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/oe-selftest13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index d9ffd40e8c..c3215ea659 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -336,10 +336,15 @@ def list_testsuite_by(criteria, keyword):
336 # Get a testsuite based on 'keyword' 336 # Get a testsuite based on 'keyword'
337 # criteria: name, class, module, id, tag 337 # criteria: name, class, module, id, tag
338 # keyword: a list of tests, classes, modules, ids, tags 338 # keyword: a list of tests, classes, modules, ids, tags
339 339 def tc_key(t):
340 ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) for tc in get_testsuite_by(criteria, keyword) ]) 340 if t[0] is None:
341 341 return (0,) + t[1:]
342 print('%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % ('id', 'tag', 'name', 'class', 'module')) 342 return t
343 # tcid may be None if no ID was assigned, in which case sorted() will throw
344 # a TypeError as Python 3 does not allow comparison (<,<=,>=,>) of
345 # heterogeneous types, handle this by using a custom key generator
346 ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) \
347 for tc in get_testsuite_by(criteria, keyword) ], key=tc_key)
343 print('_' * 150) 348 print('_' * 150)
344 for t in ts: 349 for t in ts:
345 if isinstance(t[1], (tuple, list)): 350 if isinstance(t[1], (tuple, list)):