diff options
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 4211ffc379..b4cf34b720 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -13,6 +13,7 @@ import inspect | |||
13 | import subprocess | 13 | import subprocess |
14 | import signal | 14 | import signal |
15 | import shutil | 15 | import shutil |
16 | import functools | ||
16 | try: | 17 | try: |
17 | import bb | 18 | import bb |
18 | except ImportError: | 19 | except ImportError: |
@@ -340,7 +341,14 @@ class TestContext(object): | |||
340 | for index, suite in enumerate(suites): | 341 | for index, suite in enumerate(suites): |
341 | set_suite_depth(suite) | 342 | set_suite_depth(suite) |
342 | suite.index = index | 343 | suite.index = index |
343 | suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index))) | 344 | |
345 | def cmp(a, b): | ||
346 | return (a > b) - (a < b) | ||
347 | |||
348 | def cmpfunc(a, b): | ||
349 | return cmp((a.depth, a.index), (b.depth, b.index)) | ||
350 | |||
351 | suites.sort(key=functools.cmp_to_key(cmpfunc)) | ||
344 | 352 | ||
345 | self.suite = testloader.suiteClass(suites) | 353 | self.suite = testloader.suiteClass(suites) |
346 | 354 | ||