diff options
author | Kang Kai <kai.kang@windriver.com> | 2012-12-18 18:16:28 +0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-01-04 22:01:20 -0800 |
commit | 96fb96ddd00881947875518df832fa74faec8a45 (patch) | |
tree | c01e5c2bc26fc307c2d236f2b7a7d70de8d79509 /meta/recipes-devtools/perl | |
parent | c76ae248334606d10ab730b1b2e9f626ff3c5809 (diff) | |
download | openembedded-core-96fb96ddd00881947875518df832fa74faec8a45.tar.gz openembedded-core-96fb96ddd00881947875518df832fa74faec8a45.tar.bz2 openembedded-core-96fb96ddd00881947875518df832fa74faec8a45.zip |
perl: add sub-package perl-tests
In perl source code, run "make test" will run perl test cases. Put these
cases into a seprated sub-package then we can run the perl test on
target.
Add following module to nonxs_ext to install extra modules that required
by perl test cases:
CPAN/Meta CPAN/Meta/YAML Dumpvalue Env File/CheckTree HTTP/Tiny I18N/Collate
JSON/PP Perl/OSType Version/Requirements
Commands to run test:
cd /opt/perl-tests/t && ./TEST
[Yocto 3296]
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/perl')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.14.2/config.sh | 18 | ||||
-rw-r--r-- | meta/recipes-devtools/perl/perl-tests.inc | 34 | ||||
-rw-r--r-- | meta/recipes-devtools/perl/perl_5.14.2.bb | 3 |
3 files changed, 53 insertions, 2 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh index d1db02e711..324a67c71f 100644 --- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh +++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh @@ -847,7 +847,23 @@ netdb_net_type='in_addr_t' nm='nm' nm_opt='' nm_so_opt='--dynamic' -nonxs_ext='Archive/Extract Archive/Tar Attribute/Handlers AutoLoader B/Debug B/Deparse B/Lint CGI CPAN CPANPLUS CPANPLUS/Dist/Build Class/ISA Devel/SelfStubber Digest Errno ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/ParseXS File/Fetch File/Path File/Temp FileCache Filter/Simple Getopt/Long I18N/LangTags IO/Compress IO/Zlib IPC/Cmd IPC/Open2 IPC/Open3 Locale/Codes Locale/Maketext Locale/Maketext/Simple Log/Message Log/Message/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Pluggable NEXT Net/Ping Object/Accessor Package/Constants Params/Check Parse/CPAN/Meta PerlIO/via/QuotedPrint Pod/Escapes Pod/Html Pod/LaTeX Pod/Parser Pod/Perldoc Pod/Plainer Pod/Simple Safe SelfLoader Shell Switch Term/ANSIColor Term/Cap Term/UI Test Test/Harness Test/Simple Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/Local Unicode/Collate XSLoader autodie autouse base bignum constant encoding/warnings if lib libnet parent podlators' +nonxs_ext='Archive/Extract Archive/Tar Attribute/Handlers AutoLoader B/Debug \ +B/Deparse B/Lint CGI CPAN CPAN/Meta CPAN/Meta/YAML CPANPLUS CPANPLUS/Dist/Build \ +Class/ISA Devel/SelfStubber Digest Dumpvalue Env Errno ExtUtils/CBuilder \ +ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker \ +ExtUtils/Manifest ExtUtils/ParseXS File/CheckTree File/Fetch File/Path File/Temp \ +FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags \ +IO/Compress IO/Zlib IPC/Cmd IPC/Open2 IPC/Open3 JSON/PP Locale/Codes \ +Locale/Maketext Locale/Maketext/Simple Log/Message Log/Message/Simple \ +Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList \ +Module/Load Module/Load/Conditional Module/Loaded Module/Pluggable NEXT Net/Ping \ +Object/Accessor Package/Constants Params/Check Parse/CPAN/Meta Perl/OSType \ +PerlIO/via/QuotedPrint Pod/Escapes Pod/Html Pod/LaTeX Pod/Parser Pod/Perldoc \ +Pod/Plainer Pod/Simple Safe SelfLoader Shell Switch Term/ANSIColor Term/Cap \ +Term/UI Test Test/Harness Test/Simple Text/Balanced Text/ParseWords Text/Tabs \ +Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize \ +Tie/RefHash Time/Local Unicode/Collate Version/Requirements XSLoader autodie \ +autouse base bignum constant encoding/warnings if lib libnet parent podlators' nroff='nroff' nvEUformat='"E"' nvFUformat='"F"' diff --git a/meta/recipes-devtools/perl/perl-tests.inc b/meta/recipes-devtools/perl/perl-tests.inc new file mode 100644 index 0000000000..c968eb645b --- /dev/null +++ b/meta/recipes-devtools/perl/perl-tests.inc @@ -0,0 +1,34 @@ +PACKAGES += "perl-tests" +PERL_TEST_DIR = "/opt/perl-tests" + +do_install_append () { + mkdir -p ${D}${PERL_TEST_DIR} + cp -pv TestInit.pm MANIFEST config.sh ${D}${PERL_TEST_DIR}/ + + tar -cf - t/ | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) + ln -sf ${bindir}/perl ${D}${PERL_TEST_DIR}/t/ + ln -sf ${libdir}/perl/${PV} ${D}${PERL_TEST_DIR}/lib + + for dir in `find ext/ dist/ cpan/ -maxdepth 2 -type d -name t ` ; do + tar -cf - $dir | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) + done + for file in `find ext dist cpan -name \*.t -o -name \test.pl`; do + tar -cf - $file | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) + done + + # Tweaks to make tests pass + cp -pv lib/unicore/TestProp.pl ${D}${libdir}/perl/${PV}/unicore/ + cp -pv lib/AnyDBM_File.t ${D}${libdir}/perl/${PV}/ + + mkdir -p ${D}${libdir}/perl/${PV}/XS + cp -pv lib/XS/{APItest,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/ + cp -pv lib/auto/XS/Typemap/Typemap.so ${D}${libdir}/perl/${PV}/auto/XS/Typemap/ + + cp -pv cpan/Digest-MD5/{README,MD5.xs} ${D}${PERL_TEST_DIR}/cpan/Digest-MD5/ +} + +FILES_${PN}-tests = "${PERL_TEST_DIR} \ + ${libdir}/perl/${PV}/AnyDBM_File.t" +RDEPENDS_${PN}-tests = "${PN}-modules ${PN}-doc ${PN}-misc" diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb index 4dac5ceb86..8cff7f58cf 100644 --- a/meta/recipes-devtools/perl/perl_5.14.2.bb +++ b/meta/recipes-devtools/perl/perl_5.14.2.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ # We need gnugrep (for -I) DEPENDS = "virtual/db grep-native" DEPENDS += "gdbm zlib" -PR = "r15" +PR = "r16" # 5.10.1 has Module::Build built-in PROVIDES += "libmodule-build-perl" @@ -319,6 +319,7 @@ RPROVIDES_perl-lib = "perl-lib" require perl-rdepends_${PV}.inc require perl-rprovides.inc require perl-rprovides_${PV}.inc +include perl-tests.inc SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" |