mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-28 19:11:24 +00:00
libplist: add ptest support
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
f0306dccd7
commit
a16c3b3c6b
@ -54,6 +54,7 @@ PTESTS_FAST_META_OE = "\
|
|||||||
xmlsec1 \
|
xmlsec1 \
|
||||||
zeromq \
|
zeromq \
|
||||||
cjson \
|
cjson \
|
||||||
|
libplist \
|
||||||
"
|
"
|
||||||
PTESTS_FAST_META_OE:append:x86 = " mcelog"
|
PTESTS_FAST_META_OE:append:x86 = " mcelog"
|
||||||
PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
|
PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for t in `ls test/*.test`; do
|
||||||
|
top_srcdir=$(pwd)/input top_builddir=$(pwd)/test ./$t && echo PASS: $t || echo FAIL: $t
|
||||||
|
rm $(pwd)/test/test/data/* 2>/dev/null
|
||||||
|
done
|
||||||
@ -6,10 +6,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ebb5c50ab7cab4baeffba14977030c07 \
|
|||||||
|
|
||||||
DEPENDS = "libxml2 glib-2.0 swig python3"
|
DEPENDS = "libxml2 glib-2.0 swig python3"
|
||||||
|
|
||||||
inherit autotools pkgconfig python3native python3targetconfig
|
inherit autotools pkgconfig python3native python3targetconfig ptest
|
||||||
|
|
||||||
SRCREV = "2117b8fdb6b4096455bd2041a63e59a028120136"
|
SRCREV = "2117b8fdb6b4096455bd2041a63e59a028120136"
|
||||||
SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master"
|
SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master \
|
||||||
|
file://run-ptest \
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST"
|
CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST"
|
||||||
@ -30,6 +32,28 @@ do_install:append () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_install_ptest(){
|
||||||
|
# tests expect a particular directory structure for input and output
|
||||||
|
install -d ${D}${PTEST_PATH}/input/test/data
|
||||||
|
install -d ${D}${PTEST_PATH}/test/tools
|
||||||
|
install -d ${D}${PTEST_PATH}/test/test/.libs
|
||||||
|
install -d ${D}${PTEST_PATH}/test/test/data
|
||||||
|
install ${S}/test/data/* ${D}${PTEST_PATH}/input/test/data/
|
||||||
|
install ${S}/test/*.test ${D}${PTEST_PATH}/test/
|
||||||
|
install -m 0755 ${B}/test/.libs/plist* ${D}${PTEST_PATH}/test/test/.libs/
|
||||||
|
install -m 0755 ${B}/test/.libs/integer_set_test ${D}${PTEST_PATH}/test/test/
|
||||||
|
for t in $(find ${B}/test -type f -name 'plist*' \! -name '*.o'); do
|
||||||
|
install -m 0755 $t ${D}${PTEST_PATH}/test/test/
|
||||||
|
done
|
||||||
|
for t in $(find ${B}/tools -type f -name 'plist*' \! -name '*.o'); do
|
||||||
|
install -m 0755 $t ${D}${PTEST_PATH}/test/tools/
|
||||||
|
done
|
||||||
|
sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
|
||||||
|
${D}${PTEST_PATH}/test/test/plist_cmp
|
||||||
|
sed -i 's@LD_LIBRARY_PATH="[^"]*:@LD_LIBRARY_PATH="@g' \
|
||||||
|
${D}${PTEST_PATH}/test/test/plist_test
|
||||||
|
}
|
||||||
|
|
||||||
PACKAGES =+ "${PN}-utils \
|
PACKAGES =+ "${PN}-utils \
|
||||||
${PN}++ \
|
${PN}++ \
|
||||||
${PN}-python"
|
${PN}-python"
|
||||||
@ -38,3 +62,5 @@ FILES:${PN} = "${libdir}/libplist-2.0${SOLIBS}"
|
|||||||
FILES:${PN}++ = "${libdir}/libplist++-2.0${SOLIBS}"
|
FILES:${PN}++ = "${libdir}/libplist++-2.0${SOLIBS}"
|
||||||
FILES:${PN}-utils = "${bindir}/*"
|
FILES:${PN}-utils = "${bindir}/*"
|
||||||
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
|
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
|
||||||
|
|
||||||
|
RDEPENDS:${PN}-ptest += "bash"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user