diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/testexport.bbclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass index a3208806bc..6009349341 100644 --- a/meta/classes/testexport.bbclass +++ b/meta/classes/testexport.bbclass | |||
@@ -23,8 +23,14 @@ TEST_TARGET ?= "simpleremote" | |||
23 | TEST_TARGET_IP ?= "" | 23 | TEST_TARGET_IP ?= "" |
24 | TEST_SERVER_IP ?= "" | 24 | TEST_SERVER_IP ?= "" |
25 | 25 | ||
26 | TEST_EXPORT_SDK_PACKAGES ?= "" | ||
27 | TEST_EXPORT_SDK_ENABLED ?= "0" | ||
28 | TEST_EXPORT_SDK_NAME ?= "testexport-tools-nativesdk" | ||
29 | TEST_EXPORT_SDK_DIR ?= "sdk" | ||
30 | |||
26 | TEST_EXPORT_DEPENDS = "" | 31 | TEST_EXPORT_DEPENDS = "" |
27 | TEST_EXPORT_DEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}" | 32 | TEST_EXPORT_DEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}" |
33 | TEST_EXPORT_DEPENDS += "${@bb.utils.contains('TEST_EXPORT_SDK_ENABLED', '1', 'testexport-tarball:do_populate_sdk', '', d)}" | ||
28 | TEST_EXPORT_LOCK = "${TMPDIR}/testimage.lock" | 34 | TEST_EXPORT_LOCK = "${TMPDIR}/testimage.lock" |
29 | 35 | ||
30 | python do_testexport() { | 36 | python do_testexport() { |
@@ -136,6 +142,16 @@ def exportTests(d,tc): | |||
136 | dst_f = os.path.join(export_pkg_dir, root.replace(test_pkg_dir, "").lstrip("/"), f) | 142 | dst_f = os.path.join(export_pkg_dir, root.replace(test_pkg_dir, "").lstrip("/"), f) |
137 | shutil.copy2(src_f, dst_f) | 143 | shutil.copy2(src_f, dst_f) |
138 | 144 | ||
145 | # Copy SDK | ||
146 | if d.getVar("TEST_EXPORT_SDK_ENABLED", True) == "1": | ||
147 | sdk_deploy = d.getVar("SDK_DEPLOY", True) | ||
148 | tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True) | ||
149 | tarball_path = os.path.join(sdk_deploy, tarball_name) | ||
150 | export_sdk_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), | ||
151 | d.getVar("TEST_EXPORT_SDK_DIR", True)) | ||
152 | bb.utils.mkdirhier(export_sdk_dir) | ||
153 | shutil.copy2(tarball_path, export_sdk_dir) | ||
154 | |||
139 | bb.plain("Exported tests to: %s" % exportpath) | 155 | bb.plain("Exported tests to: %s" % exportpath) |
140 | 156 | ||
141 | def testexport_main(d): | 157 | def testexport_main(d): |