diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-04-09 02:24:22 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-10 18:10:25 +0100 |
commit | 058e75d60e98841c8532a05006ae46725e3cdfd1 (patch) | |
tree | cb890b354b13110f108b83510a52298f92acacf3 /meta | |
parent | 8284e3e98d106ba40675b7bc4e68027521dfdef8 (diff) | |
download | poky-058e75d60e98841c8532a05006ae46725e3cdfd1.tar.gz |
oeqa/oetest.py: use bb logging
Plain print has two drawbacks:
- the output is handled by different processes, causing the message
about found tests to appear randomly after the result of the initial
tests
- the output is not part of the bitbake console output
Affects image testing with testimage.bbclass.
(From OE-Core rev: 4b6f87a82ece230b7296f1577d4092ef559af1d4)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 0b7e7dc42d..a3c5c1d358 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -11,6 +11,7 @@ import os, re, mmap | |||
11 | import unittest | 11 | import unittest |
12 | import inspect | 12 | import inspect |
13 | import subprocess | 13 | import subprocess |
14 | import bb | ||
14 | from oeqa.utils.decorators import LogResults | 15 | from oeqa.utils.decorators import LogResults |
15 | 16 | ||
16 | def loadTests(tc, type="runtime"): | 17 | def loadTests(tc, type="runtime"): |
@@ -33,8 +34,8 @@ def loadTests(tc, type="runtime"): | |||
33 | def runTests(tc, type="runtime"): | 34 | def runTests(tc, type="runtime"): |
34 | 35 | ||
35 | suite = loadTests(tc, type) | 36 | suite = loadTests(tc, type) |
36 | print("Test modules %s" % tc.testslist) | 37 | bb.note("Test modules %s" % tc.testslist) |
37 | print("Found %s tests" % suite.countTestCases()) | 38 | bb.note("Found %s tests" % suite.countTestCases()) |
38 | runner = unittest.TextTestRunner(verbosity=2) | 39 | runner = unittest.TextTestRunner(verbosity=2) |
39 | result = runner.run(suite) | 40 | result = runner.run(suite) |
40 | 41 | ||