All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules
@ 2018-11-24  9:07 Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test Francois Perrad
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

test_perl.py allows to test the Perl interpreter and some of its core modules,
and it is used as base class for testing CPAN modules.

Now, scancpan could generate test for CPAN modules.
Currently, there are more than 100 CPAN modules, 25 of them are XS modules.
In order to limit the number of tests (and the execution time),
a test is generated only if the module have more than one direct dependencies
and have at least one XS dependencies.

V2-> V3
  - test core module 'IO::Handle' instead of 'IO'

V1 -> V2
  - refactor with TestPerlBase class
  - check "This is perl 5"

Francois Perrad (8):
  support/testing: add perl test
  scancpan: add generation of test
  support/testing: add perl-class-load test
  support/testing: add perl-gdgraph test
  support/testing: add perl-libwww-perl test
  support/testing: add perl-mail-dkim test
  support/testing: add perl-x10 test
  support/testing: add perl-xml-libxml test

 .gitlab-ci.yml                                |  7 ++
 support/testing/tests/package/test_perl.py    | 66 ++++++++++++++++++
 .../tests/package/test_perl_class_load.py     | 28 ++++++++
 .../tests/package/test_perl_gdgraph.py        | 22 ++++++
 .../tests/package/test_perl_libwww_perl.py    | 41 ++++++++++++
 .../tests/package/test_perl_mail_dkim.py      | 28 ++++++++
 .../testing/tests/package/test_perl_x10.py    | 22 ++++++
 .../tests/package/test_perl_xml_libxml.py     | 22 ++++++
 utils/scancpan                                | 67 +++++++++++++++++++
 9 files changed, 303 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl.py
 create mode 100644 support/testing/tests/package/test_perl_class_load.py
 create mode 100644 support/testing/tests/package/test_perl_gdgraph.py
 create mode 100644 support/testing/tests/package/test_perl_libwww_perl.py
 create mode 100644 support/testing/tests/package/test_perl_mail_dkim.py
 create mode 100644 support/testing/tests/package/test_perl_x10.py
 create mode 100644 support/testing/tests/package/test_perl_xml_libxml.py

-- 
2.17.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-27  2:24   ` Ricardo Martincoski
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 2/8] scancpan: add generation of test Francois Perrad
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 .gitlab-ci.yml                             |  1 +
 support/testing/tests/package/test_perl.py | 66 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bb488e1fc..3a8ba1109 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -312,6 +312,7 @@ tests.init.test_systemd.TestInitSystemSystemdRwNetworkd: *runtime_test
 tests.package.test_dropbear.TestDropbear: *runtime_test
 tests.package.test_ipython.TestIPythonPy2: *runtime_test
 tests.package.test_ipython.TestIPythonPy3: *runtime_test
+tests.package.test_perl.TestPerl: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl.py b/support/testing/tests/package/test_perl.py
new file mode 100644
index 000000000..033b7cf34
--- /dev/null
+++ b/support/testing/tests/package/test_perl.py
@@ -0,0 +1,66 @@
+import os
+
+import infra.basetest
+
+
+class TestPerlBase(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def login(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv7",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+    def module_test(self, module, script="1"):
+        cmd = "perl -M{} -e '{}'".format(module, script)
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+
+
+class TestPerl(TestPerlBase):
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        """
+
+    def version_test(self):
+        cmd = "perl -v"
+        output, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+        self.assertIn("This is perl 5", output[1])
+
+    def core_modules_test(self):
+        self.module_test("Cwd")
+        self.module_test("Data::Dumper")
+        self.module_test("Devel::Peek")
+        self.module_test("Digest::MD5")
+        self.module_test("Digest::SHA")
+        self.module_test("Encode")
+        self.module_test("Fcntl")
+        self.module_test("File::Glob")
+        self.module_test("Hash::Util")
+        self.module_test("I18N::Langinfo")
+        self.module_test("IO::Handle")
+        self.module_test("IPC::SysV")
+        self.module_test("List::Util")
+        self.module_test("MIME::Base64")
+        self.module_test("POSIX")
+        self.module_test("Socket")
+        self.module_test("Storable")
+        self.module_test("Sys::Hostname")
+        self.module_test("Sys::Syslog")
+        self.module_test("Time::HiRes")
+        self.module_test("Time::Piece")
+        self.module_test("Unicode::Collate")
+        self.module_test("Unicode::Normalize")
+
+    def test_run(self):
+        self.login()
+        self.version_test()
+        self.core_modules_test()
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 2/8] scancpan: add generation of test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 3/8] support/testing: add perl-class-load test Francois Perrad
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 utils/scancpan | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/utils/scancpan b/utils/scancpan
index 78ea08c6e..2a58591e5 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -575,6 +575,32 @@ sub find_license_files {
     return @license_files;
 }
 
+sub want_test {
+    my ($distname) = @_;
+    return 1 if $need_dlopen{$distname} && scalar @{$deps_runtime{$distname}} > 1;
+}
+
+sub get_dependencies {
+    my ($distname) = @_;
+    my %dep = map { $_ => 1 } @{$deps_runtime{$distname}};
+    for my $direct (@{$deps_runtime{$distname}}) {
+        for (get_dependencies( $direct )) {
+            $dep{$_} = 1;
+        }
+    }
+    return keys %dep;
+}
+
+sub get_indirect_dependencies {
+    my ($distname) = @_;
+    my %indirect;
+    my %direct = map { $_ => 1 } @{$deps_runtime{$distname}};
+    for my $dep (get_dependencies( $distname )) {
+        $indirect{$dep} = 1 unless exists $direct{$dep};
+    }
+    return keys %indirect;
+}
+
 sub fetch {
     my ($name, $need_target, $need_host, $top) = @_;
     $need_target{$name} = $need_target if $need_target;
@@ -688,6 +714,7 @@ while (my ($distname, $dist) = each %dist) {
     my $mkname = $dirname . q{/} . $fsname . q{.mk};
     my $hashname = $dirname . q{/} . $fsname . q{.hash};
     my $brname = brname( $fsname );
+    my $testname = q{support/testing/tests/package/test_} . lc $brname . q{.py};
     unless (-d $dirname) {
         mkdir $dirname;
         $new_pkgs = 1;
@@ -779,6 +806,46 @@ while (my ($distname, $dist) = each %dist) {
         }
         close $fh;
     }
+    if (want_test( $distname ) && ($force || !-f $testname)) {
+        my $classname = $distname;
+        $classname =~ s|-||g;
+        my $modname = $distname;
+        $modname =~ s|-|::|g;
+        my @indirect = (get_indirect_dependencies( $distname ));
+        say qq{write ${testname}} unless $quiet;
+        open my $fh, q{>}, $testname;
+        say {$fh} qq{from tests.package.test_perl import TestPerlBase};
+        say {$fh} qq{};
+        say {$fh} qq{};
+        say {$fh} qq{class TestPerl${classname}(TestPerlBase):};
+        say {$fh} qq{    """};
+        say {$fh} qq{    package:};
+        say {$fh} qq{        ${distname}};
+        say {$fh} qq{    direct dependencies:};
+        foreach my $dep (sort @{$deps_runtime{$distname}}) {
+            my $mark = want_test( $dep ) ? q{ *} : q{};
+            say {$fh} qq{        ${dep}${mark}};
+        }
+        if (scalar @indirect > 0) {
+            say {$fh} qq{    indirect dependencies:};
+            foreach my $dep (sort @indirect) {
+                my $mark = want_test( $dep ) ? q{ *} : q{};
+                say {$fh} qq{        ${dep}${mark}};
+            }
+        }
+        say {$fh} qq{    """};
+        say {$fh} qq{};
+        say {$fh} qq{    config = TestPerlBase.config + \\};
+        say {$fh} qq{        """};
+        say {$fh} qq{        BR2_PACKAGE_PERL=y};
+        say {$fh} qq{        BR2_PACKAGE_${brname}=y};
+        say {$fh} qq{        """};
+        say {$fh} qq{};
+        say {$fh} qq{    def test_run(self):};
+        say {$fh} qq{        self.login()};
+        say {$fh} qq{        self.module_test("${modname}")};
+        close $fh;
+    }
 }
 
 if ($new_pkgs) {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 3/8] support/testing: add perl-class-load test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 2/8] scancpan: add generation of test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 4/8] support/testing: add perl-gdgraph test Francois Perrad
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872329]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../tests/package/test_perl_class_load.py     | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_class_load.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3a8ba1109..e315e78f0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -313,6 +313,7 @@ tests.package.test_dropbear.TestDropbear: *runtime_test
 tests.package.test_ipython.TestIPythonPy2: *runtime_test
 tests.package.test_ipython.TestIPythonPy3: *runtime_test
 tests.package.test_perl.TestPerl: *runtime_test
+tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_class_load.py b/support/testing/tests/package/test_perl_class_load.py
new file mode 100644
index 000000000..1e86c0374
--- /dev/null
+++ b/support/testing/tests/package/test_perl_class_load.py
@@ -0,0 +1,28 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerlClassLoad(TestPerlBase):
+    """
+    package:
+        Class-Load
+    direct dependencies:
+        Data-OptList *
+        Module-Implementation
+        Module-Runtime
+        Package-Stash
+        Try-Tiny
+    indirect dependencies:
+        Dist-CheckConflicts
+        Params-Util
+        Sub-Install
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_CLASS_LOAD=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("Class::Load")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 4/8] support/testing: add perl-gdgraph test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (2 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 3/8] support/testing: add perl-class-load test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test Francois Perrad
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872330]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../tests/package/test_perl_gdgraph.py        | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_gdgraph.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e315e78f0..00cdb3576 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -314,6 +314,7 @@ tests.package.test_ipython.TestIPythonPy2: *runtime_test
 tests.package.test_ipython.TestIPythonPy3: *runtime_test
 tests.package.test_perl.TestPerl: *runtime_test
 tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test
+tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_gdgraph.py b/support/testing/tests/package/test_perl_gdgraph.py
new file mode 100644
index 000000000..16cd8cb8e
--- /dev/null
+++ b/support/testing/tests/package/test_perl_gdgraph.py
@@ -0,0 +1,22 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerlGDGraph(TestPerlBase):
+    """
+    package:
+        GDGraph
+    direct dependencies:
+        GD
+        GDTextUtil
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_GDGRAPH=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("GD")
+        self.module_test("GD::Graph")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (3 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 4/8] support/testing: add perl-gdgraph test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24 10:06   ` Thomas Petazzoni
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 6/8] support/testing: add perl-mail-dkim test Francois Perrad
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872332]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../tests/package/test_perl_libwww_perl.py    | 41 +++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_libwww_perl.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 00cdb3576..344acc254 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -315,6 +315,7 @@ tests.package.test_ipython.TestIPythonPy3: *runtime_test
 tests.package.test_perl.TestPerl: *runtime_test
 tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test
 tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
+tests.package.test_perl_libwww_perl.TestPerllibwwwperl: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_libwww_perl.py b/support/testing/tests/package/test_perl_libwww_perl.py
new file mode 100644
index 000000000..e777071bb
--- /dev/null
+++ b/support/testing/tests/package/test_perl_libwww_perl.py
@@ -0,0 +1,41 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerllibwwwperl(TestPerlBase):
+    """
+    package:
+        libwww-perl
+    direct dependencies:
+        Encode-Locale
+        File-Listing
+        HTML-Parser
+        HTTP-Cookies
+        HTTP-Daemon
+        HTTP-Date
+        HTTP-Message
+        HTTP-Negotiate
+        LWP-MediaTypes
+        Net-HTTP
+        Try-Tiny
+        URI
+        WWW-RobotRules
+    indirect dependencies:
+        HTML-Tagset
+        IO-HTML
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_LIBWWW_PERL=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("LWP")
+        self.module_test("LWP::UserAgent")
+        self.module_test("LWP::Authen::Basic")
+        self.module_test("LWP::Authen::Digest")
+        self.module_test("HTTP::Message")
+        self.module_test("HTTP::Daemon")
+        self.module_test("WWW::RobotRules")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 6/8] support/testing: add perl-mail-dkim test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (4 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 7/8] support/testing: add perl-x10 test Francois Perrad
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872333]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../tests/package/test_perl_mail_dkim.py      | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_mail_dkim.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 344acc254..14e6a27ac 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -316,6 +316,7 @@ tests.package.test_perl.TestPerl: *runtime_test
 tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test
 tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
 tests.package.test_perl_libwww_perl.TestPerllibwwwperl: *runtime_test
+tests.package.test_perl_mail_dkim.TestPerlMailDKIM: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_mail_dkim.py b/support/testing/tests/package/test_perl_mail_dkim.py
new file mode 100644
index 000000000..dc4d4bb3a
--- /dev/null
+++ b/support/testing/tests/package/test_perl_mail_dkim.py
@@ -0,0 +1,28 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerlMailDKIM(TestPerlBase):
+    """
+    package:
+        Mail-DKIM
+    direct dependencies:
+        Crypt-OpenSSL-RSA
+        MailTools
+        Net-DNS
+        Net-DNS-Resolver-Mock
+        YAML-LibYAML
+    indirect dependencies:
+        Crypt-OpenSSL-Random
+        Digest-HMAC
+        TimeDate
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_MAIL_DKIM=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("Mail::DKIM")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 7/8] support/testing: add perl-x10 test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (5 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 6/8] support/testing: add perl-mail-dkim test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 8/8] support/testing: add perl-xml-libxml test Francois Perrad
  2018-12-03 19:53 ` [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Thomas Petazzoni
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872334]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../testing/tests/package/test_perl_x10.py    | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_x10.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 14e6a27ac..55938a0dc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -317,6 +317,7 @@ tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test
 tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
 tests.package.test_perl_libwww_perl.TestPerllibwwwperl: *runtime_test
 tests.package.test_perl_mail_dkim.TestPerlMailDKIM: *runtime_test
+tests.package.test_perl_x10.TestPerlX10: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_x10.py b/support/testing/tests/package/test_perl_x10.py
new file mode 100644
index 000000000..46f247f2d
--- /dev/null
+++ b/support/testing/tests/package/test_perl_x10.py
@@ -0,0 +1,22 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerlX10(TestPerlBase):
+    """
+    package:
+        X10
+    direct dependencies:
+        Astro-SunTime
+        Device-SerialPort
+        Time-ParseDate
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_X10=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("X10")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 8/8] support/testing: add perl-xml-libxml test
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (6 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 7/8] support/testing: add perl-x10 test Francois Perrad
@ 2018-11-24  9:07 ` Francois Perrad
  2018-12-03 19:53 ` [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Thomas Petazzoni
  8 siblings, 0 replies; 15+ messages in thread
From: Francois Perrad @ 2018-11-24  9:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/124872335]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .gitlab-ci.yml                                |  1 +
 .../tests/package/test_perl_xml_libxml.py     | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 support/testing/tests/package/test_perl_xml_libxml.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 55938a0dc..b7114f5dc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -318,6 +318,7 @@ tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
 tests.package.test_perl_libwww_perl.TestPerllibwwwperl: *runtime_test
 tests.package.test_perl_mail_dkim.TestPerlMailDKIM: *runtime_test
 tests.package.test_perl_x10.TestPerlX10: *runtime_test
+tests.package.test_perl_xml_libxml.TestPerlXMLLibXML: *runtime_test
 tests.package.test_python.TestPython2: *runtime_test
 tests.package.test_python.TestPython3: *runtime_test
 tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
diff --git a/support/testing/tests/package/test_perl_xml_libxml.py b/support/testing/tests/package/test_perl_xml_libxml.py
new file mode 100644
index 000000000..76eacfaea
--- /dev/null
+++ b/support/testing/tests/package/test_perl_xml_libxml.py
@@ -0,0 +1,22 @@
+from tests.package.test_perl import TestPerlBase
+
+
+class TestPerlXMLLibXML(TestPerlBase):
+    """
+    package:
+        XML-LibXML
+    direct dependencies:
+        XML-NamespaceSupport
+        XML-SAX
+        XML-SAX-Base
+    """
+
+    config = TestPerlBase.config + \
+        """
+        BR2_PACKAGE_PERL=y
+        BR2_PACKAGE_PERL_XML_LIBXML=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("XML::LibXML")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test Francois Perrad
@ 2018-11-24 10:06   ` Thomas Petazzoni
  2018-11-24 10:56     ` François Perrad
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2018-11-24 10:06 UTC (permalink / raw)
  To: buildroot

Hello Fran?ois,

Thanks a lot for this work on adding tests for Perl packages. It is
really great to see the testing infrastructure being used more widely.
A few questions below.

On Sat, 24 Nov 2018 10:07:19 +0100, Francois Perrad wrote:

> +class TestPerllibwwwperl(TestPerlBase):
> +    """
> +    package:
> +        libwww-perl
> +    direct dependencies:
> +        Encode-Locale
> +        File-Listing
> +        HTML-Parser
> +        HTTP-Cookies
> +        HTTP-Daemon
> +        HTTP-Date
> +        HTTP-Message
> +        HTTP-Negotiate
> +        LWP-MediaTypes
> +        Net-HTTP
> +        Try-Tiny
> +        URI
> +        WWW-RobotRules
> +    indirect dependencies:
> +        HTML-Tagset
> +        IO-HTML
> +    """

Sorry if I haven't followed the previous discussion, but why do we have
this docstring ? Is it just for information ?

> +    config = TestPerlBase.config + \
> +        """
> +        BR2_PACKAGE_PERL=y
> +        BR2_PACKAGE_PERL_LIBWWW_PERL=y
> +        """
> +
> +    def test_run(self):
> +        self.login()
> +        self.module_test("LWP")
> +        self.module_test("LWP::UserAgent")
> +        self.module_test("LWP::Authen::Basic")
> +        self.module_test("LWP::Authen::Digest")
> +        self.module_test("HTTP::Message")
> +        self.module_test("HTTP::Daemon")
> +        self.module_test("WWW::RobotRules")

Why are you testing specifically those modules ? What is the rule to
decide what modules are tested here ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test
  2018-11-24 10:06   ` Thomas Petazzoni
@ 2018-11-24 10:56     ` François Perrad
  2018-11-24 11:37       ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: François Perrad @ 2018-11-24 10:56 UTC (permalink / raw)
  To: buildroot

Le sam. 24 nov. 2018 ? 11:06, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> Hello Fran?ois,
>
> Thanks a lot for this work on adding tests for Perl packages. It is
> really great to see the testing infrastructure being used more widely.
> A few questions below.
>
> On Sat, 24 Nov 2018 10:07:19 +0100, Francois Perrad wrote:
>
> > +class TestPerllibwwwperl(TestPerlBase):
> > +    """
> > +    package:
> > +        libwww-perl
> > +    direct dependencies:
> > +        Encode-Locale
> > +        File-Listing
> > +        HTML-Parser
> > +        HTTP-Cookies
> > +        HTTP-Daemon
> > +        HTTP-Date
> > +        HTTP-Message
> > +        HTTP-Negotiate
> > +        LWP-MediaTypes
> > +        Net-HTTP
> > +        Try-Tiny
> > +        URI
> > +        WWW-RobotRules
> > +    indirect dependencies:
> > +        HTML-Tagset
> > +        IO-HTML
> > +    """
>
> Sorry if I haven't followed the previous discussion, but why do we have
> this docstring ? Is it just for information ?
>
>
Yes, this is for information.
By this way, we know that we don't need to write another test for HTTP-Date
or IO-HTML.

> +    config = TestPerlBase.config + \
> > +        """
> > +        BR2_PACKAGE_PERL=y
> > +        BR2_PACKAGE_PERL_LIBWWW_PERL=y
> > +        """
> > +
> > +    def test_run(self):
> > +        self.login()
> > +        self.module_test("LWP")
> > +        self.module_test("LWP::UserAgent")
> > +        self.module_test("LWP::Authen::Basic")
> > +        self.module_test("LWP::Authen::Digest")
> > +        self.module_test("HTTP::Message")
> > +        self.module_test("HTTP::Daemon")
> > +        self.module_test("WWW::RobotRules")
>
> Why are you testing specifically those modules ? What is the rule to
> decide what modules are tested here ?
>
>
libwww-perl is a special package/distribution from the beginning of the WWW
history
(started in 1995, see https://metacpan.org/changes/distribution/libwww-perl
).
In fact, libwww-perl collection is a set of Perl modules.
LWP (Lib World-Wide Web Perl) is just a name space for some of them, and
doesn't match with the distribution name libwww.
So, we need load most of them.

Fran?ois


> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181124/67c3d3c3/attachment.html>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test
  2018-11-24 10:56     ` François Perrad
@ 2018-11-24 11:37       ` Thomas Petazzoni
  2018-11-24 13:42         ` François Perrad
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2018-11-24 11:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 24 Nov 2018 11:56:30 +0100, Fran?ois Perrad wrote:

> > Sorry if I haven't followed the previous discussion, but why do we have
> > this docstring ? Is it just for information ?
> >  
> Yes, this is for information.

OK.

> By this way, we know that we don't need to write another test for HTTP-Date
> or IO-HTML.

This is not really true. Indeed, if you test HTTP-Date with plenty of
other packages installed, how are you sure that HTTP-Date has all the
necessary runtime dependencies it needs ?

Only a test with only HTTP-Date installed and its dependencies will
allow to verify this.

> > > +    def test_run(self):
> > > +        self.login()
> > > +        self.module_test("LWP")
> > > +        self.module_test("LWP::UserAgent")
> > > +        self.module_test("LWP::Authen::Basic")
> > > +        self.module_test("LWP::Authen::Digest")
> > > +        self.module_test("HTTP::Message")
> > > +        self.module_test("HTTP::Daemon")
> > > +        self.module_test("WWW::RobotRules")  
> >
> > Why are you testing specifically those modules ? What is the rule to
> > decide what modules are tested here ?
> >
> >  
> libwww-perl is a special package/distribution from the beginning of the WWW
> history
> (started in 1995, see https://metacpan.org/changes/distribution/libwww-perl
> ).
> In fact, libwww-perl collection is a set of Perl modules.
> LWP (Lib World-Wide Web Perl) is just a name space for some of them, and
> doesn't match with the distribution name libwww.
> So, we need load most of them.

OK, so all those modules are the ones part of libwww-perl, i.e we are
not testing modules installed by other packages, correct ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test
  2018-11-24 11:37       ` Thomas Petazzoni
@ 2018-11-24 13:42         ` François Perrad
  0 siblings, 0 replies; 15+ messages in thread
From: François Perrad @ 2018-11-24 13:42 UTC (permalink / raw)
  To: buildroot

Le sam. 24 nov. 2018 ? 12:44, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> Hello,
>
> On Sat, 24 Nov 2018 11:56:30 +0100, Fran?ois Perrad wrote:
>
> > > Sorry if I haven't followed the previous discussion, but why do we have
> > > this docstring ? Is it just for information ?
> > >
> > Yes, this is for information.
>
> OK.
>
> > By this way, we know that we don't need to write another test for
> HTTP-Date
> > or IO-HTML.
>
> This is not really true. Indeed, if you test HTTP-Date with plenty of
> other packages installed, how are you sure that HTTP-Date has all the
> necessary runtime dependencies it needs ?
>
> Only a test with only HTTP-Date installed and its dependencies will
> allow to verify this.
>
>
I want also to limit the number of test, see cover letter.

> > > +    def test_run(self):
> > > > +        self.login()
> > > > +        self.module_test("LWP")
> > > > +        self.module_test("LWP::UserAgent")
> > > > +        self.module_test("LWP::Authen::Basic")
> > > > +        self.module_test("LWP::Authen::Digest")
> > > > +        self.module_test("HTTP::Message")
> > > > +        self.module_test("HTTP::Daemon")
> > > > +        self.module_test("WWW::RobotRules")
> > >
> > > Why are you testing specifically those modules ? What is the rule to
> > > decide what modules are tested here ?
> > >
> > >
> > libwww-perl is a special package/distribution from the beginning of the
> WWW
> > history
> > (started in 1995, see
> https://metacpan.org/changes/distribution/libwww-perl
> > ).
> > In fact, libwww-perl collection is a set of Perl modules.
> > LWP (Lib World-Wide Web Perl) is just a name space for some of them, and
> > doesn't match with the distribution name libwww.
> > So, we need load most of them.
>
> OK, so all those modules are the ones part of libwww-perl, i.e we are
> not testing modules installed by other packages, correct ?
>
>
Correct.

Fran?ois


> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181124/3607940e/attachment.html>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test Francois Perrad
@ 2018-11-27  2:24   ` Ricardo Martincoski
  0 siblings, 0 replies; 15+ messages in thread
From: Ricardo Martincoski @ 2018-11-27  2:24 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, Nov 24, 2018 at 07:07 AM, Francois Perrad wrote:

> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/125775389]
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>


Regards,
Ricardo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules
  2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
                   ` (7 preceding siblings ...)
  2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 8/8] support/testing: add perl-xml-libxml test Francois Perrad
@ 2018-12-03 19:53 ` Thomas Petazzoni
  8 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-12-03 19:53 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 24 Nov 2018 10:07:14 +0100, Francois Perrad wrote:

> Francois Perrad (8):
>   support/testing: add perl test
>   scancpan: add generation of test
>   support/testing: add perl-class-load test
>   support/testing: add perl-gdgraph test
>   support/testing: add perl-libwww-perl test
>   support/testing: add perl-mail-dkim test
>   support/testing: add perl-x10 test
>   support/testing: add perl-xml-libxml test

Thanks a lot for this work, series applied!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-12-03 19:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24  9:07 [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 1/8] support/testing: add perl test Francois Perrad
2018-11-27  2:24   ` Ricardo Martincoski
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 2/8] scancpan: add generation of test Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 3/8] support/testing: add perl-class-load test Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 4/8] support/testing: add perl-gdgraph test Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 5/8] support/testing: add perl-libwww-perl test Francois Perrad
2018-11-24 10:06   ` Thomas Petazzoni
2018-11-24 10:56     ` François Perrad
2018-11-24 11:37       ` Thomas Petazzoni
2018-11-24 13:42         ` François Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 6/8] support/testing: add perl-mail-dkim test Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 7/8] support/testing: add perl-x10 test Francois Perrad
2018-11-24  9:07 ` [Buildroot] [PATCH/next v3 8/8] support/testing: add perl-xml-libxml test Francois Perrad
2018-12-03 19:53 ` [Buildroot] [PATCH/next v3 0/8] suppport/testing: Perl interpreter and CPAN modules Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.