perl: fixed ptest cases failed
PATCH 1/1 perl: fixed ptest cases failed
From: Chong Lu <[email protected]>
Some ptest cases failed, because perl ptest depends on source code. In order to make test cases to pass, we copy source code to target to resolve dependence issue.
perl-dev provides some files for test cases, so we make perl ptest relies on it.
Signed-off-by Chong Lu <[email protected]>
--- meta/recipes-devtools/perl/perl-5.14.3/config.sh | 4 +-- meta/recipes-devtools/perl/perl-ptest.inc | 37 ++++------------------ 2 files changed, 8 insertions(+), 33 deletions(-)
meta/recipes-devtools/perl/perl-5.14.3/config.sh +2 -2
@@ -1082,7 +1082,7 @@ vendorprefixexp='/usr' vendorscript='@USRBIN@' vendorscriptexp='@USRBIN@' version='5.14.3' -version_patchlevel_string='version 14 subversion 2' +version_patchlevel_string='version 14 subversion 3' versiononly='undef' vi='' voidflags='15'
@@ -1093,7 +1093,7 @@ zcat='' zip='zip' PERL_REVISION=5 PERL_VERSION=14 -PERL_SUBVERSION=2 +PERL_SUBVERSION=3 PERL_API_REVISION=5 PERL_API_VERSION=14 PERL_API_SUBVERSION=0
meta/recipes-devtools/perl/perl-ptest.inc +6 -31
@@ -5,37 +5,11 @@ 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 - ) + sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl + sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh + tar -cf - * --exclude \*.o --exclude Makefile --exclude makefile --exclude hostperl --exclude miniperl | ( cd ${D}${PTEST_PATH} && tar -xf - ) + cp -pv cpan/Module-Metadata/lib/Module/Metadata.pm ${D}${PTEST_PATH}/lib/Module/ 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() {
@@ -47,4 +21,5 @@ python populate_packages_prepend() { '${PN}-ptest%s', '%s', recursive=True, match_path=True) } -RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc" +RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc ${PN}-dev" +INSANE_SKIP_${PN}-ptest += "dev-deps"
Signature · 1 line
1.7.9.5
Quoted 8 lines · On Fri, 2013-11-29 at 19:37 +0800, [email protected] wrote:
From: Chong Lu <[email protected]>
Some ptest cases failed, because perl ptest depends on source code. In order to make test cases to pass, we copy source code to target to resolve dependence issue.
perl-dev provides some files for test cases, so we make perl ptest relies on it.
Quoted 5 lines
Signed-off-by Chong Lu <[email protected]>--- meta/recipes-devtools/perl/perl-5.14.3/config.sh | 4 +-- meta/recipes-devtools/perl/perl-ptest.inc | 37 ++++------------------ 2 files changed, 8 insertions(+), 33 deletions(-)
We tried this on the autobuilder and lots of builds failed, for example:
Cheers,
Richard