From 03af7b99e3ce36ce3e29dc31e33d2cc74eb14849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Sat, 30 Jan 2016 19:16:10 -0600 Subject: oetest.py/TestContext: Move loadTests and runTests inside it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Method's for loadTests and runTests make sense to define inside TestContext because it can be different around Image, SDK, SDKExt. Signed-off-by: Aníbal Limón Signed-off-by: Ross Burton --- meta/classes/testsdk.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/classes/testsdk.bbclass') diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 47bad29096..ba8897e5ea 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass @@ -13,7 +13,7 @@ def testsdk_main(d): import oeqa.sdk import time import subprocess - from oeqa.oetest import loadTests, runTests, SDKTestContext + from oeqa.oetest import SDKTestContext pn = d.getVar("PN", True) bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True)) @@ -40,13 +40,13 @@ def testsdk_main(d): # we are doing that to find compile errors in the tests themselves # before booting the image try: - loadTests(tc, "sdk") + tc.loadTests() except Exception as e: import traceback bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) starttime = time.time() - result = runTests(tc, "sdk") + result = tc.runTests() stoptime = time.time() if result.wasSuccessful(): bb.plain("%s SDK(%s):%s - Ran %d test%s in %.3fs" % (pn, os.path.basename(tcname), os.path.basename(sdkenv),result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime)) -- cgit v1.2.3