diff options
author | Aníbal Limón <limon.anibal@gmail.com> | 2016-01-30 19:16:10 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 16:06:23 +0000 |
commit | 3577c35f6e09112b795b0cbc12c21911815568a6 (patch) | |
tree | 8d239a0ca7ead09e7f2f468ade74d9016f494b61 /meta/classes/testsdk.bbclass | |
parent | 8009418d55721171bb2632b7af72b0b0eaa1933d (diff) | |
download | openembedded-core-contrib-3577c35f6e09112b795b0cbc12c21911815568a6.tar.gz |
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>
Diffstat (limited to 'meta/classes/testsdk.bbclass')
-rw-r--r-- | meta/classes/testsdk.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
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)) |