diff options
| author | Kang Kai <kai.kang@windriver.com> | 2012-12-18 18:16:28 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-07 11:09:36 +0000 |
| commit | 61583fe11f2494e37ec0dd6e3bdeadf33f25f199 (patch) | |
| tree | e29f0d343260bfc62819c1c4e1133211943284a0 | |
| parent | 52c6393375d49ca469aa9e6bfcc608b74fcb1c44 (diff) | |
| download | poky-61583fe11f2494e37ec0dd6e3bdeadf33f25f199.tar.gz | |
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]
(From OE-Core rev: 96fb96ddd00881947875518df832fa74faec8a45)
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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' | |||
| 847 | nm='nm' | 847 | nm='nm' |
| 848 | nm_opt='' | 848 | nm_opt='' |
| 849 | nm_so_opt='--dynamic' | 849 | nm_so_opt='--dynamic' |
| 850 | 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' | 850 | nonxs_ext='Archive/Extract Archive/Tar Attribute/Handlers AutoLoader B/Debug \ |
| 851 | B/Deparse B/Lint CGI CPAN CPAN/Meta CPAN/Meta/YAML CPANPLUS CPANPLUS/Dist/Build \ | ||
| 852 | Class/ISA Devel/SelfStubber Digest Dumpvalue Env Errno ExtUtils/CBuilder \ | ||
| 853 | ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker \ | ||
| 854 | ExtUtils/Manifest ExtUtils/ParseXS File/CheckTree File/Fetch File/Path File/Temp \ | ||
| 855 | FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags \ | ||
| 856 | IO/Compress IO/Zlib IPC/Cmd IPC/Open2 IPC/Open3 JSON/PP Locale/Codes \ | ||
| 857 | Locale/Maketext Locale/Maketext/Simple Log/Message Log/Message/Simple \ | ||
| 858 | Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList \ | ||
| 859 | Module/Load Module/Load/Conditional Module/Loaded Module/Pluggable NEXT Net/Ping \ | ||
| 860 | Object/Accessor Package/Constants Params/Check Parse/CPAN/Meta Perl/OSType \ | ||
| 861 | PerlIO/via/QuotedPrint Pod/Escapes Pod/Html Pod/LaTeX Pod/Parser Pod/Perldoc \ | ||
| 862 | Pod/Plainer Pod/Simple Safe SelfLoader Shell Switch Term/ANSIColor Term/Cap \ | ||
| 863 | Term/UI Test Test/Harness Test/Simple Text/Balanced Text/ParseWords Text/Tabs \ | ||
| 864 | Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize \ | ||
| 865 | Tie/RefHash Time/Local Unicode/Collate Version/Requirements XSLoader autodie \ | ||
| 866 | autouse base bignum constant encoding/warnings if lib libnet parent podlators' | ||
| 851 | nroff='nroff' | 867 | nroff='nroff' |
| 852 | nvEUformat='"E"' | 868 | nvEUformat='"E"' |
| 853 | nvFUformat='"F"' | 869 | 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 @@ | |||
| 1 | PACKAGES += "perl-tests" | ||
| 2 | PERL_TEST_DIR = "/opt/perl-tests" | ||
| 3 | |||
| 4 | do_install_append () { | ||
| 5 | mkdir -p ${D}${PERL_TEST_DIR} | ||
| 6 | cp -pv TestInit.pm MANIFEST config.sh ${D}${PERL_TEST_DIR}/ | ||
| 7 | |||
| 8 | tar -cf - t/ | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) | ||
| 9 | ln -sf ${bindir}/perl ${D}${PERL_TEST_DIR}/t/ | ||
| 10 | ln -sf ${libdir}/perl/${PV} ${D}${PERL_TEST_DIR}/lib | ||
| 11 | |||
| 12 | for dir in `find ext/ dist/ cpan/ -maxdepth 2 -type d -name t ` ; do | ||
| 13 | tar -cf - $dir | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) | ||
| 14 | done | ||
| 15 | for file in `find ext dist cpan -name \*.t -o -name \test.pl`; do | ||
| 16 | tar -cf - $file | ( cd ${D}${PERL_TEST_DIR} && tar -xf - ) | ||
| 17 | done | ||
| 18 | |||
| 19 | # Tweaks to make tests pass | ||
| 20 | cp -pv lib/unicore/TestProp.pl ${D}${libdir}/perl/${PV}/unicore/ | ||
| 21 | cp -pv lib/AnyDBM_File.t ${D}${libdir}/perl/${PV}/ | ||
| 22 | |||
| 23 | mkdir -p ${D}${libdir}/perl/${PV}/XS | ||
| 24 | cp -pv lib/XS/{APItest,Typemap}.pm ${D}${libdir}/perl/${PV}/XS/ | ||
| 25 | mkdir -p ${D}${libdir}/perl/${PV}/auto/XS/APItest | ||
| 26 | cp -pv lib/auto/XS/APItest/APItest.so ${D}${libdir}/perl/${PV}/auto/XS/APItest/ | ||
| 27 | cp -pv lib/auto/XS/Typemap/Typemap.so ${D}${libdir}/perl/${PV}/auto/XS/Typemap/ | ||
| 28 | |||
| 29 | cp -pv cpan/Digest-MD5/{README,MD5.xs} ${D}${PERL_TEST_DIR}/cpan/Digest-MD5/ | ||
| 30 | } | ||
| 31 | |||
| 32 | FILES_${PN}-tests = "${PERL_TEST_DIR} \ | ||
| 33 | ${libdir}/perl/${PV}/AnyDBM_File.t" | ||
| 34 | 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 \ | |||
| 7 | # We need gnugrep (for -I) | 7 | # We need gnugrep (for -I) |
| 8 | DEPENDS = "virtual/db grep-native" | 8 | DEPENDS = "virtual/db grep-native" |
| 9 | DEPENDS += "gdbm zlib" | 9 | DEPENDS += "gdbm zlib" |
| 10 | PR = "r15" | 10 | PR = "r16" |
| 11 | 11 | ||
| 12 | # 5.10.1 has Module::Build built-in | 12 | # 5.10.1 has Module::Build built-in |
| 13 | PROVIDES += "libmodule-build-perl" | 13 | PROVIDES += "libmodule-build-perl" |
| @@ -319,6 +319,7 @@ RPROVIDES_perl-lib = "perl-lib" | |||
| 319 | require perl-rdepends_${PV}.inc | 319 | require perl-rdepends_${PV}.inc |
| 320 | require perl-rprovides.inc | 320 | require perl-rprovides.inc |
| 321 | require perl-rprovides_${PV}.inc | 321 | require perl-rprovides_${PV}.inc |
| 322 | include perl-tests.inc | ||
| 322 | 323 | ||
| 323 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" | 324 | SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh" |
| 324 | 325 | ||
