Patchwork [meta-fsl-arm,v3,09/23] libfslcodec: Add 'test-bin' and 'test-sources' packages

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 6, 2014, 10:10 p.m.
Message ID <1391724650-31290-10-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/66437/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Otavio Salvador - Feb. 6, 2014, 10:10 p.m.
Add the libfslcodec-test-bin (with built binaries for testing) and
libfslcodec-test-sources (with testing applications source code).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v3: None
Changes in v2: None

 recipes-multimedia/libfslcodec/libfslcodec.inc | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

Patch

diff --git a/recipes-multimedia/libfslcodec/libfslcodec.inc b/recipes-multimedia/libfslcodec/libfslcodec.inc
index a693ecf..ee807ba 100644
--- a/recipes-multimedia/libfslcodec/libfslcodec.inc
+++ b/recipes-multimedia/libfslcodec/libfslcodec.inc
@@ -12,7 +12,7 @@  SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
 PACKAGES_DYNAMIC = "${PN}-*"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-PACKAGES += "${PN}-meta"
+PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source"
 
 ALLOW_EMPTY_${PN} = "1"
 ALLOW_EMPTY_${PN}-meta = "1"
@@ -37,8 +37,6 @@  do_install_append() {
     done
     rmdir ${D}${libdir}/imx-mm/video-codec
 
-	# FIXME: Drop examples
-	rm -r ${D}${datadir}/imx-mm
 }
 
 python populate_packages_prepend() {
@@ -53,11 +51,18 @@  python populate_packages_prepend() {
     # the source we cannot fix it. Disable the insane check for now.
     for p in d.getVar('PACKAGES', True).split():
         d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1")
-        d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
+
+        if p == 'libfslcodec-test-bin':
+            # FIXME: includes the DUT .so files so we need to deploy those
+            d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir")
+        else:
+            d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel")
 
     # Allow addition of all codecs in a image; useful specially for
     # debugging.
     codec_pkgs = oe.utils.packages_filter_out_system(d)
+    codec_pkgs = filter(lambda x: x not in ['libfslcodec-test-bin', 'libfslcodec-test-source'],
+                        codec_pkgs)
     d.appendVar('RDEPENDS_libfslcodec-meta', ' ' + ' '.join(codec_pkgs))
 }
 
@@ -68,6 +73,10 @@  FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \
                     ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \
                     ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*"
 
+FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin"
+
+FILES_${PN}-test-source += "${datadir}/imx-mm/*"
+
 # FIXME: The wrap and lib names does not match
 FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*"