mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
oetest.py/TestContext: Move loadTests and runTests inside it.
Method's for loadTests and runTests make sense to define inside TestContext because it can be different around Image, SDK, SDKExt. (From OE-Core rev: 03af7b99e3ce36ce3e29dc31e33d2cc74eb14849) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8009418d55
commit
3577c35f6e
@@ -195,7 +195,7 @@ def testimage_main(d):
|
||||
import oeqa.runtime
|
||||
import time
|
||||
import signal
|
||||
from oeqa.oetest import loadTests, runTests, ImageTestContext
|
||||
from oeqa.oetest import ImageTestContext
|
||||
from oeqa.targetcontrol import get_target_controller
|
||||
from oeqa.utils.dump import get_host_dumper
|
||||
|
||||
@@ -219,7 +219,7 @@ def testimage_main(d):
|
||||
# we are doing that to find compile errors in the tests themselves
|
||||
# before booting the image
|
||||
try:
|
||||
loadTests(tc)
|
||||
tc.loadTests()
|
||||
except Exception as e:
|
||||
import traceback
|
||||
bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
|
||||
@@ -233,7 +233,7 @@ def testimage_main(d):
|
||||
try:
|
||||
target.start()
|
||||
starttime = time.time()
|
||||
result = runTests(tc)
|
||||
result = tc.runTests()
|
||||
stoptime = time.time()
|
||||
if result.wasSuccessful():
|
||||
bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
|
||||
|
||||
Reference in New Issue
Block a user