Files
poky/meta/recipes-devtools/perl/perl-ptest.inc
Jeffrey C Honig 8072e0726c perl: perl-ptest.inc polutes package dependencies when ptest not enabled
When ptest is not enabled, the populate_packages_prepend function runs
wheter ptest is enabled or not.  This causes ptest packages to get in the
dependencies list when ptest is not enabled.

(From OE-Core master rev: 826f4e4057a221127ac4c1d0658d975032fc7d90)

(From OE-Core rev: e739a64143901fa6f6f54e70445d19e9ce13dcf1)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:18 +00:00

51 lines
1.9 KiB
PHP

inherit ptest
SRC_URI += "file://run-ptest \
"
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
cp -pv TestInit.pm MANIFEST config.sh ${D}${PTEST_PATH}/
tar -cf - t/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/
ln -sf ${libdir}/perl/${PV} ${D}${PTEST_PATH}/lib
for dir in `find ext/ dist/ cpan/ -maxdepth 2 -type d -name t ` ; do
tar -cf - $dir | ( cd ${D}${PTEST_PATH} && tar -xf - )
done
for file in `find ext dist cpan -name \*.t -o -name \test.pl`; do
tar -cf - $file | ( cd ${D}${PTEST_PATH} && tar -xf - )
done
# Tweaks to make tests pass
cp -pv lib/unicore/TestProp.pl ${D}${libdir}/perl/${PV}/unicore/
# Put all *.t files from the lib dir in the ptest package
cd lib
for file in `find -name \*.t`; do
tar -cf - $file | ( cd ${D}${libdir}/perl/${PV} && tar -xf - )
done
cd ..
mkdir -p ${D}${libdir}/perl/${PV}/XS
cp -pv lib/XS/APItest.pm ${D}${libdir}/perl/${PV}/XS/
cp -pv lib/XS/Typemap.pm ${D}${libdir}/perl/${PV}/XS/
mkdir -p ${D}${libdir}/perl/${PV}/auto/XS/APItest
cp -pv lib/auto/XS/APItest/APItest.so ${D}${libdir}/perl/${PV}/auto/XS/APItest/
mkdir -p ${D}${libdir}/perl/${PV}/auto/XS/Typemap
cp -pv lib/auto/XS/Typemap/Typemap.so ${D}${libdir}/perl/${PV}/auto/XS/Typemap/
cp -pv cpan/Digest-MD5/README ${D}${PTEST_PATH}/cpan/Digest-MD5/
cp -pv cpan/Digest-MD5/MD5.xs ${D}${PTEST_PATH}/cpan/Digest-MD5/
}
python populate_packages_prepend() {
# Put all *.t files from the lib dir in the ptest package
# do_split_packages requires a pair of () in the regex, but we have nothing
# to match, so use an empty pair.
if "ptest" in d.getVar("DISTRO_FEATURES", True).split():
do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()',
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc"