Skip to contentSkip to conversation

utils/scancpan: add a check of XS dependencies in generated test

PATCH New Francois Perrad 2 participants 3 messages Mar 29, 2019 – Mar 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 utils/scancpan: add a check of XS dependencies in generated test

The XS modules have a high propability to fail (compared to Pure Perl modules), so it is valuable to check XS dependencies before the check of the main module.

---
 utils/scancpan | 8 ++++++++
 1 file changed, 8 insertions(+)
utils/scancpan +8 -0
index 8073ad197..0e7585e31 100755
@@ -845,6 +845,14 @@ while (my ($distname, $dist) = each %dist) {
         say {$fh} qq{};
         say {$fh} qq{    def test_run(self):};
         say {$fh} qq{        self.login()};
+        foreach my $dep (sort grep { $is_xs{$_} } @indirect) {
+            $dep =~ s|-|::|g;
+            say {$fh} qq{        self.module_test("${dep}")};
+        }
+        foreach my $dep (sort grep { $is_xs{$_} } @{$deps_runtime{$distname}}) {
+            $dep =~ s|-|::|g;
+            say {$fh} qq{        self.module_test("${dep}")};
+        }
         say {$fh} qq{        self.module_test("${modname}")};
         close $fh;
     }
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 support/testing/tests/package/test_perl_*: regeneration

---
 support/testing/tests/package/test_perl_class_load.py  | 1 +
 support/testing/tests/package/test_perl_libwww_perl.py | 1 +
 support/testing/tests/package/test_perl_mail_dkim.py   | 2 ++
 support/testing/tests/package/test_perl_x10.py         | 1 +
 4 files changed, 5 insertions(+)
support/testing/tests/package/test_perl_class_load.py +1 -0
index fbcd904aa..042297002 100644
@@ -25,4 +25,5 @@ class TestPerlClassLoad(TestPerlBase):
 
     def test_run(self):
         self.login()
+        self.module_test("Params::Util")
         self.module_test("Class::Load")
support/testing/tests/package/test_perl_libwww_perl.py +1 -0
index af9f7c7ed..7b30e4b94 100644
@@ -36,6 +36,7 @@ class TestPerllibwwwperl(TestPerlBase):
         self.module_test("LWP::UserAgent")
         self.module_test("LWP::Authen::Basic")
         self.module_test("LWP::Authen::Digest")
+        self.module_test("HTML::Parser")
         self.module_test("HTTP::Message")
         self.module_test("HTTP::Daemon")
         self.module_test("WWW::RobotRules")
support/testing/tests/package/test_perl_mail_dkim.py +2 -0
index 7affce82b..cd9e75795 100644
@@ -25,4 +25,6 @@ class TestPerlMailDKIM(TestPerlBase):
 
     def test_run(self):
         self.login()
+        self.module_test("Crypt::OpenSSL::Random")
+        self.module_test("Crypt::OpenSSL::RSA")
         self.module_test("Mail::DKIM")
support/testing/tests/package/test_perl_x10.py +1 -0
index 84feb74e6..b587804a9 100644
@@ -19,4 +19,5 @@ class TestPerlX10(TestPerlBase):
 
     def test_run(self):
         self.login()
+        self.module_test("Device::SerialPort")
         self.module_test("X10")
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/2 utils/scancpan: add a check of XS dependencies in generated test

In reply to Francois Perrad
Quoted 7 lines · On Fri, 29 Mar 2019 19:05:24 +0100 Francois Perrad <[email protected]> wrote:

The XS modules have a high propability to fail (compared to Pure Perl modules), so it is valuable to check XS dependencies before the check of the main module.

---
 utils/scancpan | 8 ++++++++
 1 file changed, 8 insertions(+)

Both applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com