summaryrefslogtreecommitdiffstats
path: root/meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-12-19 16:13:15 -0500
committerScott Murray <scott.murray@konsulko.com>2020-12-21 09:41:02 -0500
commitaf25a3b5a46c74124f1fb99e7157cc6aea879a5c (patch)
tree5a6ba2e217d11d6145f6a00226715e520a441d8d /meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl
parent4e5b9be85750852559f22b0b3493e6074b8f4fac (diff)
meta-agl-basesystem: add libxml-xpath-perl
Add libxml-xpath-perl recipe and recipes for its required dependencies libscalar-list-utils-perl and libpath-tiny-perl. This should enable using the xpath utility in the basesystem build by DEPENDing on libxml-xpath-perl-native. Note that the libscalar-list-utils-perl recipe has been adapted from the one present in meta-cpan (https://github.com/meta-cpan/meta-cpan) as of commit 2f6ecfa. This was viewed as preferable to pulling in meta-cpan as an AGL dependency. Additionally, the recipe has been updated to enable ptest support, and all tests have been confirmed to pass. The same is true of the libxml-xpath-perl and libpath-tiny-perl ptests. Bug-AGL: SPEC-3670 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Icd25cbb4498636c5a6a384818535e3c3372b5b29
Diffstat (limited to 'meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl')
-rw-r--r--meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl/adjust-load-test-for-ptest.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl/adjust-load-test-for-ptest.patch b/meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl/adjust-load-test-for-ptest.patch
new file mode 100644
index 00000000..23e6569d
--- /dev/null
+++ b/meta-oem-production-readiness/meta-agl-basesystem/recipes-devtools/perl/libxml-xpath-perl/adjust-load-test-for-ptest.patch
@@ -0,0 +1,51 @@
+t/00load.t: Adjust for ptest
+
+Change load test to look for installed location in @INC as base for
+modules instead of locally in 'lib' directory as when run inside the
+source tree.
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ t/00load.t | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/t/00load.t b/t/00load.t
+index abc8c58..88a5545 100644
+--- a/t/00load.t
++++ b/t/00load.t
+@@ -5,21 +5,29 @@ use strict;
+ use warnings FATAL => 'all';
+
+ use Test::More tests => 22;
+-use lib 'lib';
+ use Path::Tiny;
+
+-my $dir = path('lib/');
++my $installdir = "";
++foreach (@INC) {
++ if (-d "$_/XML/XPath") {
++ $installdir = "$_/XML/XPath";
++ last;
++ }
++}
++my $dir = path($installdir);
+ my $iter = $dir->iterator({
+ recurse => 1,
+ follow_symlinks => 0,
+ });
+
++BAIL_OUT( "XML::XPath does not compile" ) unless require_ok("XML::XPath");
++
+ while (my $path = $iter->()) {
+ next if $path->is_dir || $path !~ /\.pm$/;
+ my $module = $path->relative;
+- $module =~ s/(?:^lib\/|\.pm$)//g;
++ $module =~ s/(?:^.*XML\/|\.pm$)//g;
+ $module =~ s/\//::/g;
+- BAIL_OUT( "$module does not compile" ) unless require_ok($module);
++ BAIL_OUT( "$module does not compile" ) unless require_ok("XML::$module");
+ }
+
+ diag( "Testing XML::XPath $XML::XPath::VERSION, Perl $], $^X" );