summaryrefslogtreecommitdiffstats
path: root/meta/classes/testsdk.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/testsdk.bbclass')
-rw-r--r--meta/classes/testsdk.bbclass50
1 files changed, 0 insertions, 50 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
deleted file mode 100644
index 758a23ac55..0000000000
--- a/meta/classes/testsdk.bbclass
+++ /dev/null
@@ -1,50 +0,0 @@
1# Copyright (C) 2013 - 2016 Intel Corporation
2#
3# Released under the MIT license (see COPYING.MIT)
4
5# testsdk.bbclass enables testing for SDK and Extensible SDK
6#
7# To run SDK tests, run the commands:
8# $ bitbake <image-name> -c populate_sdk
9# $ bitbake <image-name> -c testsdk
10#
11# To run eSDK tests, run the commands:
12# $ bitbake <image-name> -c populate_sdk_ext
13# $ bitbake <image-name> -c testsdkext
14#
15# where "<image-name>" is an image like core-image-sato.
16
17TESTSDK_CLASS_NAME ?= "oeqa.sdk.testsdk.TestSDK"
18TESTSDKEXT_CLASS_NAME ?= "oeqa.sdkext.testsdk.TestSDKExt"
19
20def import_and_run(name, d):
21 import importlib
22
23 class_name = d.getVar(name)
24 if class_name:
25 module, cls = class_name.rsplit('.', 1)
26 m = importlib.import_module(module)
27 c = getattr(m, cls)()
28 c.run(d)
29 else:
30 bb.warn('No tests were run because %s did not define a class' % name)
31
32import_and_run[vardepsexclude] = "DATETIME BB_ORIGENV"
33
34python do_testsdk() {
35 import_and_run('TESTSDK_CLASS_NAME', d)
36}
37addtask testsdk
38do_testsdk[nostamp] = "1"
39
40python do_testsdkext() {
41 import_and_run('TESTSDKEXT_CLASS_NAME', d)
42}
43addtask testsdkext
44do_testsdkext[nostamp] = "1"
45
46python () {
47 if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"):
48 bb.build.addtask("testsdk", None, "do_populate_sdk", d)
49 bb.build.addtask("testsdkext", None, "do_populate_sdk_ext", d)
50}