From: Mariano Lopez <mariano.lo...@linux.intel.com>

This new recipe is used when exporting runtime test outside
packages that won't be installed in the testing system but
are required for the runtime testing.

This new recipe is almost identical to buildtools-tarball,
but is able to define the SDK packages in local.conf.

[YOCTO #7850]

Signed-off-by: Mariano Lopez <mariano.lo...@linux.intel.com>
---
 meta/recipes-core/meta/testexport-tarball.bb | 56 ++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 meta/recipes-core/meta/testexport-tarball.bb

diff --git a/meta/recipes-core/meta/testexport-tarball.bb 
b/meta/recipes-core/meta/testexport-tarball.bb
new file mode 100644
index 0000000..951d3be
--- /dev/null
+++ b/meta/recipes-core/meta/testexport-tarball.bb
@@ -0,0 +1,56 @@
+DESCRIPTION = "SDK type target for standalone tarball containing packages 
defined by TEST_EXPORT_TOOLS. The \
+               tarball can be used to run missing programs on testing systems 
which don't have such tools.\
+               This recipe is almost the same as buildtools-tarball"
+SUMMARY = "Standalone tarball for test systems with missing software"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+                    
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+TOOLCHAIN_TARGET_TASK ?= ""
+
+TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
+
+SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+
+TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
+
+SDK_TITLE = "Testexport tools"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+inherit toolchain-scripts
+
+create_sdk_files_append () {
+       rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
+       rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
+       rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
+
+       # Generate new (mini) sdk-environment-setup file
+       script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
+       touch $script
+       echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+       # In order for the self-extraction script to correctly extract and set 
up things,
+       # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup 
script.
+       # However, testexport-tarball is inherently a tool set instead of a 
fully functional SDK,
+       # so instead of exporting the variable, we use a comment here.
+       echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+       toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+       echo 'export 
GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' 
>>$script
+
+       if [ "${SDKMACHINE}" = "i686" ]; then
+               echo 'export NO32LIBS="0"' >>$script
+               echo 'echo "$BB_ENV_EXTRAWHITE" | grep -q "NO32LIBS"' >>$script
+               echo '[ $? != 0 ] && export BB_ENV_EXTRAWHITE="NO32LIBS 
$BB_ENV_EXTRAWHITE"' >>$script
+       fi
+}
+
+# testexport-tarball doesn't need config site
+TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
+
+# The recipe doesn't need any default deps
+INHIBIT_DEFAULT_DEPS = "1"
-- 
2.6.6

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to