[Buildroot] [RFC 1/4] support/testing: add perl test

Ricardo Martincoski ricardo.martincoski at gmail.com
Mon Nov 19 01:11:49 UTC 2018


Hello,

In overall, the series looks good.
Except for the general discussion in the cover letter about which path we want
to follow (add the infra to add a .pl to the image in build time or not), I have
only nits.

On Sat, Nov 17, 2018 at 03:52 PM, Francois Perrad wrote:

[snip]
> +class TestPerl(infra.basetest.BRTest):
> +    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> +        """
> +        BR2_TARGET_ROOTFS_CPIO=y
> +        # BR2_TARGET_ROOTFS_TAR is not set
> +        BR2_PACKAGE_PERL=y

nit: this is not the order after 'make savedefconfig'

> +        """
> +
[snip]
> +    def version_test(self, timeout=-1):

This timeout is always used with its default value, you can remove from here and
from the call to emulator.run 2 lines below.

> +        cmd = "perl -v"

What about using this instead?
        cmd = "perl -v | grep 'This is perl 5'"
I guess Perl 6 will take a long time to be supported in Buildroot.

> +        _, exit_code = self.emulator.run(cmd, timeout)
> +        self.assertEqual(exit_code, 0)
> +
> +    def module_test(self, module, script="1", timeout=-1):

If we end up using the extra logic (basically copied from TestPythonPackageBase)
and having the .pl file added to the tree, this method would not be needed.


Regards,
Ricardo


More information about the buildroot mailing list