aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAníbal Limón <limon.anibal@gmail.com>2016-01-30 19:16:10 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 15:51:03 +0000
commit03af7b99e3ce36ce3e29dc31e33d2cc74eb14849 (patch)
tree55ffd0a7d47d6bd70e90ea160d43d28097525a02 /meta/classes
parent552285688441330440bd1bc138aeaea87549024a (diff)
downloadopenembedded-core-contrib-03af7b99e3ce36ce3e29dc31e33d2cc74eb14849.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. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/testimage.bbclass6
-rw-r--r--meta/classes/testsdk.bbclass6
2 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 7f9c918273..53c6174ac5 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -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))
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))