diff options
| -rw-r--r-- | meta/lib/oeqa/oetest.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index a6f89b6a86..3816c1ae9b 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
| @@ -106,6 +106,17 @@ def loadTests(tc, type="runtime"): | |||
| 106 | suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index))) | 106 | suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index))) |
| 107 | return testloader.suiteClass(suites) | 107 | return testloader.suiteClass(suites) |
| 108 | 108 | ||
| 109 | _buffer = "" | ||
| 110 | |||
| 111 | def custom_verbose(msg, *args, **kwargs): | ||
| 112 | global _buffer | ||
| 113 | if msg[-1] != "\n": | ||
| 114 | _buffer += msg | ||
| 115 | else: | ||
| 116 | _buffer += msg | ||
| 117 | bb.plain(_buffer.rstrip("\n"), *args, **kwargs) | ||
| 118 | _buffer = "" | ||
| 119 | |||
| 109 | def runTests(tc, type="runtime"): | 120 | def runTests(tc, type="runtime"): |
| 110 | 121 | ||
| 111 | suite = loadTests(tc, type) | 122 | suite = loadTests(tc, type) |
| @@ -114,6 +125,8 @@ def runTests(tc, type="runtime"): | |||
| 114 | bb.note("Filter test cases by tags: %s" % tc.tagexp) | 125 | bb.note("Filter test cases by tags: %s" % tc.tagexp) |
| 115 | bb.note("Found %s tests" % suite.countTestCases()) | 126 | bb.note("Found %s tests" % suite.countTestCases()) |
| 116 | runner = unittest.TextTestRunner(verbosity=2) | 127 | runner = unittest.TextTestRunner(verbosity=2) |
| 128 | if bb.msg.loggerDefaultVerbose: | ||
| 129 | runner.stream.write = custom_verbose | ||
| 117 | result = runner.run(suite) | 130 | result = runner.run(suite) |
| 118 | 131 | ||
| 119 | return result | 132 | return result |
