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.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
import unittest
import inspect
import subprocess
+import bb
from oeqa.utils.decorators import LogResults
def loadTests(tc, type="runtime"):
def runTests(tc, type="runtime"):
suite = loadTests(tc, type)
- print("Test modules %s" % tc.testslist)
- print("Found %s tests" % suite.countTestCases())
+ bb.note("Test modules %s" % tc.testslist)
+ bb.note("Found %s tests" % suite.countTestCases())
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(suite)