diff options
-rw-r--r-- | meta/classes-recipe/testsdk.bbclass | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools-docs/cases/README (renamed from meta/lib/oeqa/sdk/buildtools-docs-cases/README) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools-docs/cases/build.py (renamed from meta/lib/oeqa/sdk/buildtools-docs-cases/build.py) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools/cases/README (renamed from meta/lib/oeqa/sdk/buildtools-cases/README) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools/cases/build.py (renamed from meta/lib/oeqa/sdk/buildtools-cases/build.py) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools/cases/gcc.py (renamed from meta/lib/oeqa/sdk/buildtools-cases/gcc.py) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools/cases/https.py (renamed from meta/lib/oeqa/sdk/buildtools-cases/https.py) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/buildtools/cases/sanity.py (renamed from meta/lib/oeqa/sdk/buildtools-cases/sanity.py) | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/testsdk.py | 24 | ||||
-rw-r--r-- | meta/recipes-core/meta/buildtools-docs-tarball.bb | 3 | ||||
-rw-r--r-- | meta/recipes-core/meta/buildtools-tarball.bb | 21 |
11 files changed, 29 insertions, 20 deletions
diff --git a/meta/classes-recipe/testsdk.bbclass b/meta/classes-recipe/testsdk.bbclass index 59d2834c99..b1c4fa67e6 100644 --- a/meta/classes-recipe/testsdk.bbclass +++ b/meta/classes-recipe/testsdk.bbclass | |||
@@ -19,6 +19,7 @@ TESTSDK_SUITES ?= "" | |||
19 | 19 | ||
20 | TESTSDK_CLASS_NAME ?= "oeqa.sdk.testsdk.TestSDK" | 20 | TESTSDK_CLASS_NAME ?= "oeqa.sdk.testsdk.TestSDK" |
21 | TESTSDKEXT_CLASS_NAME ?= "oeqa.sdkext.testsdk.TestSDKExt" | 21 | TESTSDKEXT_CLASS_NAME ?= "oeqa.sdkext.testsdk.TestSDKExt" |
22 | TESTSDK_CASE_DIRS ?= "sdk" | ||
22 | 23 | ||
23 | def import_and_run(name, d): | 24 | def import_and_run(name, d): |
24 | import importlib | 25 | import importlib |
diff --git a/meta/lib/oeqa/sdk/buildtools-docs-cases/README b/meta/lib/oeqa/buildtools-docs/cases/README index f8edbc7dad..f8edbc7dad 100644 --- a/meta/lib/oeqa/sdk/buildtools-docs-cases/README +++ b/meta/lib/oeqa/buildtools-docs/cases/README | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-docs-cases/build.py b/meta/lib/oeqa/buildtools-docs/cases/build.py index 6e3ee94292..6e3ee94292 100644 --- a/meta/lib/oeqa/sdk/buildtools-docs-cases/build.py +++ b/meta/lib/oeqa/buildtools-docs/cases/build.py | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/README b/meta/lib/oeqa/buildtools/cases/README index d4f20faa9f..d4f20faa9f 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/README +++ b/meta/lib/oeqa/buildtools/cases/README | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/build.py b/meta/lib/oeqa/buildtools/cases/build.py index c85c32496b..c85c32496b 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/build.py +++ b/meta/lib/oeqa/buildtools/cases/build.py | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/gcc.py b/meta/lib/oeqa/buildtools/cases/gcc.py index a62c4d0bc4..a62c4d0bc4 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/gcc.py +++ b/meta/lib/oeqa/buildtools/cases/gcc.py | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/https.py b/meta/lib/oeqa/buildtools/cases/https.py index 4525e3d758..4525e3d758 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/https.py +++ b/meta/lib/oeqa/buildtools/cases/https.py | |||
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py b/meta/lib/oeqa/buildtools/cases/sanity.py index a55d456656..a55d456656 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py +++ b/meta/lib/oeqa/buildtools/cases/sanity.py | |||
diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py index 52b702b6a2..cffcf9f49a 100644 --- a/meta/lib/oeqa/sdk/testsdk.py +++ b/meta/lib/oeqa/sdk/testsdk.py | |||
@@ -31,6 +31,28 @@ class TestSDK(TestSDKBase): | |||
31 | context_class = OESDKTestContext | 31 | context_class = OESDKTestContext |
32 | test_type = 'sdk' | 32 | test_type = 'sdk' |
33 | 33 | ||
34 | def sdk_dir_names(self, d): | ||
35 | """Return list from TESTSDK_CASE_DIRS.""" | ||
36 | testdirs = d.getVar("TESTSDK_CASE_DIRS") | ||
37 | if testdirs: | ||
38 | return testdirs.split() | ||
39 | |||
40 | bb.fatal("TESTSDK_CASE_DIRS unset, can't find SDK test directories.") | ||
41 | |||
42 | def get_sdk_paths(self, d): | ||
43 | """ | ||
44 | Return a list of paths where SDK test cases reside. | ||
45 | |||
46 | SDK tests are expected in <LAYER_DIR>/lib/oeqa/<dirname>/cases | ||
47 | """ | ||
48 | paths = [] | ||
49 | for layer in d.getVar("BBLAYERS").split(): | ||
50 | for dirname in self.sdk_dir_names(d): | ||
51 | case_path = os.path.join(layer, "lib", "oeqa", dirname, "cases") | ||
52 | if os.path.isdir(case_path): | ||
53 | paths.append(case_path) | ||
54 | return paths | ||
55 | |||
34 | def get_tcname(self, d): | 56 | def get_tcname(self, d): |
35 | """ | 57 | """ |
36 | Get the name of the SDK file | 58 | Get the name of the SDK file |
@@ -115,7 +137,7 @@ class TestSDK(TestSDKBase): | |||
115 | 137 | ||
116 | try: | 138 | try: |
117 | modules = (d.getVar("TESTSDK_SUITES") or "").split() | 139 | modules = (d.getVar("TESTSDK_SUITES") or "").split() |
118 | tc.loadTests(self.context_executor_class.default_cases, modules) | 140 | tc.loadTests(self.get_sdk_paths(d), modules) |
119 | except Exception as e: | 141 | except Exception as e: |
120 | import traceback | 142 | import traceback |
121 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) | 143 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) |
diff --git a/meta/recipes-core/meta/buildtools-docs-tarball.bb b/meta/recipes-core/meta/buildtools-docs-tarball.bb index 24fbc33000..98d47f7b71 100644 --- a/meta/recipes-core/meta/buildtools-docs-tarball.bb +++ b/meta/recipes-core/meta/buildtools-docs-tarball.bb | |||
@@ -18,4 +18,5 @@ TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-docs-nativesdk-standalone-${DISTR | |||
18 | 18 | ||
19 | SDK_TITLE = "Docs Build tools tarball" | 19 | SDK_TITLE = "Docs Build tools tarball" |
20 | 20 | ||
21 | TESTSDK_CASES = "buildtools-docs-cases" | 21 | # Directory that contains testcases |
22 | TESTSDK_CASE_DIRS = "buildtools-docs" \ No newline at end of file | ||
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 6fa6d93a3d..02117ab84d 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb | |||
@@ -124,22 +124,7 @@ TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" | |||
124 | # The recipe doesn't need any default deps | 124 | # The recipe doesn't need any default deps |
125 | INHIBIT_DEFAULT_DEPS = "1" | 125 | INHIBIT_DEFAULT_DEPS = "1" |
126 | 126 | ||
127 | # Directory in testsdk that contains testcases | 127 | inherit testsdk |
128 | TESTSDK_CASES = "buildtools-cases" | ||
129 | 128 | ||
130 | # We have our own code, avoid deferred inherit | 129 | # Directory that contains testcases |
131 | SDK_CLASSES:remove = "testsdk" | 130 | TESTSDK_CASE_DIRS = "buildtools" \ No newline at end of file |
132 | |||
133 | python do_testsdk() { | ||
134 | import oeqa.sdk.testsdk | ||
135 | testsdk = oeqa.sdk.testsdk.TestSDK() | ||
136 | |||
137 | cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), d.getVar("TESTSDK_CASES")) | ||
138 | testsdk.context_executor_class.default_cases = [cases_path,] | ||
139 | |||
140 | testsdk.run(d) | ||
141 | } | ||
142 | addtask testsdk | ||
143 | do_testsdk[nostamp] = "1" | ||
144 | do_testsdk[network] = "1" | ||
145 | do_testsdk[depends] += "xz-native:do_populate_sysroot" | ||