[Buildroot] [RFC 2/4] support/testing: add perl-time-hires test
Ricardo Martincoski
ricardo.martincoski at gmail.com
Mon Nov 19 01:14:54 UTC 2018
Hello,
Just giving an example of what I mentioned in a reply to the cover letter...
On Sat, Nov 17, 2018 at 03:52 PM, Francois Perrad wrote:
[snip]
> +class TestPerlTimeHiRes(TestPerl):
> + config = TestPerl.config + \
> + """
> + BR2_PACKAGE_PERL_TIME_HIRES=y
> + """
> +
> + def test_run(self):
> + self.login()
> + self.module_test("Time::HiRes")
Another way to test a perl package would be to have an script added to the image
in build time, something like this:
sample_perl_time_hires.pl:
|use Time::HiRes;
|
|Time::HiRes::usleep(1_000_000)
And call:
perl sample_perl_time_hires.pl
This way we could test scripts with a few lines of code and keep it readable in
the tree.
Regards,
Ricardo
More information about the buildroot
mailing list