]> code.ossystems Code Review - openembedded-core.git/commitdiff
libxml-parser-perl: inherit ptest-perl
authorTim Orling <timothy.t.orling@linux.intel.com>
Sun, 4 Mar 2018 12:41:53 +0000 (04:41 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 6 Mar 2018 14:13:59 +0000 (06:13 -0800)
* Enable ptest by inheriting new ptest-perl.bbclass

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb

index cc3a660f7d2b48300d06a4b8e1a1f1e353fe84f0..c5e0ae6769735bebac81b52cb67ea0605aa288f7 100644 (file)
@@ -14,7 +14,7 @@ S = "${WORKDIR}/XML-Parser-${PV}"
 
 EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
 
-inherit cpan
+inherit cpan ptest-perl
 
 # fix up sub MakeMaker project as arguments don't get propagated though
 # see https://rt.cpan.org/Public/Bug/Display.html?id=28632
@@ -34,4 +34,13 @@ do_compile_class-native() {
        cpan_do_compile
 }
 
+do_install_ptest() {
+       sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
+       sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
+       sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
+       sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
+       cp -r ${B}/samples ${D}${PTEST_PATH}
+       chown -R root:root ${D}${PTEST_PATH}/samples
+}
+
 BBCLASSEXTEND="native nativesdk"