mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
testexport.bbclass: Add support for testexport-tarball
Add support to export the SDK tarball needed when a test system doesn't have the required software to perform runtime tests. The support is when exporting the test and when running the test on a remote system. The user of this feature just need to set TEST_EXPORT_SDK_ENABLED to "1" and declare the sdk packages in TEST_EXPORT_SDK_PACKAGES. [YOCTO #7850] (From OE-Core rev: a6041f81b81baa7564e4c712fc88de2b997e52e4) (From OE-Core rev: 05e6c89f0f71311f8bd32cdb86a2deb789c58035) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7d18d9f9c5
commit
120f7067c8
@@ -23,8 +23,14 @@ TEST_TARGET ?= "simpleremote"
|
||||
TEST_TARGET_IP ?= ""
|
||||
TEST_SERVER_IP ?= ""
|
||||
|
||||
TEST_EXPORT_SDK_PACKAGES ?= ""
|
||||
TEST_EXPORT_SDK_ENABLED ?= "0"
|
||||
TEST_EXPORT_SDK_NAME ?= "testexport-tools-nativesdk"
|
||||
TEST_EXPORT_SDK_DIR ?= "sdk"
|
||||
|
||||
TEST_EXPORT_DEPENDS = ""
|
||||
TEST_EXPORT_DEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
|
||||
TEST_EXPORT_DEPENDS += "${@bb.utils.contains('TEST_EXPORT_SDK_ENABLED', '1', 'testexport-tarball:do_populate_sdk', '', d)}"
|
||||
TEST_EXPORT_LOCK = "${TMPDIR}/testimage.lock"
|
||||
|
||||
python do_testexport() {
|
||||
@@ -136,6 +142,16 @@ def exportTests(d,tc):
|
||||
dst_f = os.path.join(export_pkg_dir, root.replace(test_pkg_dir, "").lstrip("/"), f)
|
||||
shutil.copy2(src_f, dst_f)
|
||||
|
||||
# Copy SDK
|
||||
if d.getVar("TEST_EXPORT_SDK_ENABLED", True) == "1":
|
||||
sdk_deploy = d.getVar("SDK_DEPLOY", True)
|
||||
tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True)
|
||||
tarball_path = os.path.join(sdk_deploy, tarball_name)
|
||||
export_sdk_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True),
|
||||
d.getVar("TEST_EXPORT_SDK_DIR", True))
|
||||
bb.utils.mkdirhier(export_sdk_dir)
|
||||
shutil.copy2(tarball_path, export_sdk_dir)
|
||||
|
||||
bb.plain("Exported tests to: %s" % exportpath)
|
||||
|
||||
def testexport_main(d):
|
||||
|
||||
Reference in New Issue
Block a user