summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass26
1 files changed, 24 insertions, 2 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 1e3bb066d4..2b655b49fa 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -72,15 +72,37 @@ do_testsdk[nostamp] = "1"
72do_testsdk[depends] += "${TESTIMAGEDEPENDS}" 72do_testsdk[depends] += "${TESTIMAGEDEPENDS}"
73do_testsdk[lockfiles] += "${TESTIMAGELOCK}" 73do_testsdk[lockfiles] += "${TESTIMAGELOCK}"
74 74
75# get testcase list from specified file
76# if path is a relative path, then relative to build/conf/
77def read_testlist(d, fpath):
78 if not os.path.isabs(fpath):
79 builddir = d.getVar("TOPDIR", True)
80 fpath = os.path.join(builddir, "conf", fpath)
81 if not os.path.exists(fpath):
82 bb.fatal("No such manifest file: ", fpath)
83 tcs = []
84 for line in open(fpath).readlines():
85 line = line.strip()
86 if line and not line.startswith("#"):
87 tcs.append(line)
88 return " ".join(tcs)
89
75def get_tests_list(d, type="runtime"): 90def get_tests_list(d, type="runtime"):
76 testsuites = d.getVar("TEST_SUITES", True).split() 91 testsuites = []
92 testslist = []
93 manifests = d.getVar("TEST_SUITES_MANIFEST", True)
94 if manifests is not None:
95 manifests = manifests.split()
96 for manifest in manifests:
97 testsuites.extend(read_testlist(d, manifest).split())
98 else:
99 testsuites = d.getVar("TEST_SUITES", True).split()
77 if type == "sdk": 100 if type == "sdk":
78 testsuites = (d.getVar("TEST_SUITES_SDK", True) or "auto").split() 101 testsuites = (d.getVar("TEST_SUITES_SDK", True) or "auto").split()
79 bbpath = d.getVar("BBPATH", True).split(':') 102 bbpath = d.getVar("BBPATH", True).split(':')
80 103
81 # This relies on lib/ under each directory in BBPATH being added to sys.path 104 # This relies on lib/ under each directory in BBPATH being added to sys.path
82 # (as done by default in base.bbclass) 105 # (as done by default in base.bbclass)
83 testslist = []
84 for testname in testsuites: 106 for testname in testsuites:
85 if testname != "auto": 107 if testname != "auto":
86 if testname.startswith("oeqa."): 108 if testname.startswith("oeqa."):