mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
8284e3e98d
commit
058e75d60e
@@ -11,6 +11,7 @@ import os, re, mmap
|
|||||||
import unittest
|
import unittest
|
||||||
import inspect
|
import inspect
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import bb
|
||||||
from oeqa.utils.decorators import LogResults
|
from oeqa.utils.decorators import LogResults
|
||||||
|
|
||||||
def loadTests(tc, type="runtime"):
|
def loadTests(tc, type="runtime"):
|
||||||
@@ -33,8 +34,8 @@ def loadTests(tc, type="runtime"):
|
|||||||
def runTests(tc, type="runtime"):
|
def runTests(tc, type="runtime"):
|
||||||
|
|
||||||
suite = loadTests(tc, type)
|
suite = loadTests(tc, type)
|
||||||
print("Test modules %s" % tc.testslist)
|
bb.note("Test modules %s" % tc.testslist)
|
||||||
print("Found %s tests" % suite.countTestCases())
|
bb.note("Found %s tests" % suite.countTestCases())
|
||||||
runner = unittest.TextTestRunner(verbosity=2)
|
runner = unittest.TextTestRunner(verbosity=2)
|
||||||
result = runner.run(suite)
|
result = runner.run(suite)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user