In order for the test export runner to work oetest needs to be separated from bitbake environment. There is no need to use bb import here so we can use a logger instead.
Signed-off-by: Lucian Musat <george.l.mu...@intel.com> --- meta/lib/oeqa/oetest.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index a6f89b6..1e10c6c 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -11,10 +11,12 @@ import os, re, mmap import unittest import inspect import subprocess -import bb +import logging from oeqa.utils.decorators import LogResults, gettag from sys import exc_info, exc_clear +logger = logging.getLogger("BitBake") + def getVar(obj): #extend form dict, if a variable didn't exists, need find it in testcase class VarDict(dict): @@ -89,7 +91,7 @@ def loadTests(tc, type="runtime"): suite.dependencies.append(dep_suite) break else: - bb.warn("Test %s was declared as @skipUnlessPassed('%s') but that test is either not defined or not active. Will run the test anyway." % + logger.warning("Test %s was declared as @skipUnlessPassed('%s') but that test is either not defined or not active. Will run the test anyway." % (test, depends_on)) # Use brute-force topological sort to determine ordering. Sort by # depth (higher depth = must run later), with original ordering to @@ -109,10 +111,10 @@ def loadTests(tc, type="runtime"): def runTests(tc, type="runtime"): suite = loadTests(tc, type) - bb.note("Test modules %s" % tc.testslist) + logger.info("Test modules %s" % tc.testslist) if hasattr(tc, "tagexp") and tc.tagexp: - bb.note("Filter test cases by tags: %s" % tc.tagexp) - bb.note("Found %s tests" % suite.countTestCases()) + logger.info("Filter test cases by tags: %s" % tc.tagexp) + logger.info("Found %s tests" % suite.countTestCases()) runner = unittest.TextTestRunner(verbosity=2) result = runner.run(suite) -- 2.1.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core