diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 16:31:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 23:32:39 +0100 |
commit | 1fc840ffc0267ecf3a15c4a59ab44869ef1d6339 (patch) | |
tree | b2932a0d0d7146bde799db47497236063050fc84 /meta/lib/oeqa/oetest.py | |
parent | 22c8ed6484e0ee9328e3844c9e794f3d89ebb9f7 (diff) | |
download | poky-1fc840ffc0267ecf3a15c4a59ab44869ef1d6339.tar.gz |
meta: python3 megapatch
This needs splutting into smaller units, WIP atm.
(From OE-Core rev: 21529228a7dca96a6a1b44ed9380c523efdeeb3e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 3ed5bb8c2b..869132273f 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -12,6 +12,7 @@ import unittest | |||
12 | import inspect | 12 | import inspect |
13 | import subprocess | 13 | import subprocess |
14 | import signal | 14 | import signal |
15 | import functools | ||
15 | try: | 16 | try: |
16 | import bb | 17 | import bb |
17 | except ImportError: | 18 | except ImportError: |
@@ -314,7 +315,14 @@ class TestContext(object): | |||
314 | for index, suite in enumerate(suites): | 315 | for index, suite in enumerate(suites): |
315 | set_suite_depth(suite) | 316 | set_suite_depth(suite) |
316 | suite.index = index | 317 | suite.index = index |
317 | suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index))) | 318 | |
319 | def cmp(a, b): | ||
320 | return (a > b) - (a < b) | ||
321 | |||
322 | def cmpfunc(a, b): | ||
323 | return cmp((a.depth, a.index), (b.depth, b.index)) | ||
324 | |||
325 | suites.sort(key=functools.cmp_to_key(cmpfunc)) | ||
318 | 326 | ||
319 | self.suite = testloader.suiteClass(suites) | 327 | self.suite = testloader.suiteClass(suites) |
320 | 328 | ||