mbox series

[0/1] Add ptest for less

Message ID 20230705153137.389584-1-jstephan@baylibre.com
Headers show
Series Add ptest for less | expand

Message

Julien Stephan July 5, 2023, 3:31 p.m. UTC
Hi all,

This series is adding ptest support for less.

As of today, release tarball are fetched from
http://www.greenwoodsoftware.com/ but the less test code is not bundled
within these releases. A github issue has been opened asking for
maintainer to add the test code into the release [1].

So before test code gets bundled into the release tarballs, switch to
github URI.

Here is the output when running the ptest on the target:

 FAIL: chinese1.lt
 PASS: colorbars.lt
 PASS: github216.lt
 PASS: github265.lt
 PASS: github329.lt
 PASS: hdr-unicode1.lt
 PASS: hdr-unicode.lt
 PASS: proc-special.lt
 PASS: seq200.lt
 PASS: table-50x200.lt
 FAIL: utf8-2.txt.lt
 PASS: version.c.lt
 ============================================================================
 Testsuite summary for less
 ============================================================================
 # TOTAL: 12
 # PASS: 10
 # FAIL: 2
 ============================================================================

I am building a core-image-minimal image with poky DISTRO and run it into qemu.
I have 2 FAIL. All tests PASS on my computer.
I suspect a locale issue here but I may need some help on this.

I opened a pull request on less for Makefile modification [2]

And I also opened a github issue [3] to ask a reformating of the less
test summary to follow Automake simple test format to simplify the
run-ptest script.

My branch is available on poky-contrib repository [4]

[YOCTO #15073]

Best
Julien

[1]: https://github.com/gwsw/less/issues/344
[2]: https://github.com/gwsw/less/pull/398
[3]: https://github.com/gwsw/less/issues/399
[4]: https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/add-ptest-for-less

Julien Stephan (1):
  less: add ptest support

 .../distro/include/ptest-packagelists.inc     |  1 +
 ...akefile-allow-CFLAGS-to-be-overitten.patch | 28 +++++++++++++
 ...esstest-Makefile-add-LDFLAGS-support.patch | 41 +++++++++++++++++++
 meta/recipes-extended/less/files/run-ptest    | 25 +++++++++++
 meta/recipes-extended/less/less_633.bb        | 37 ++++++++++++++---
 5 files changed, 127 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-extended/less/files/0001-lesstest-Makefile-allow-CFLAGS-to-be-overitten.patch
 create mode 100644 meta/recipes-extended/less/files/0002-lesstest-Makefile-add-LDFLAGS-support.patch
 create mode 100644 meta/recipes-extended/less/files/run-ptest

Comments

Ross Burton July 5, 2023, 3:52 p.m. UTC | #1
Hi Julien,

> On 5 Jul 2023, at 16:31, Julien Stephan via lists.openembedded.org <jstephan=baylibre.com@lists.openembedded.org> wrote:
> So before test code gets bundled into the release tarballs, switch to
> github URI.
> 

Please split this into a separate commit, so we can review the change to git separately from the addition of ptest.

> FAIL: chinese1.lt
> FAIL: utf8-2.txt.lt

If there’s a way to make the tests more verbose when they fail then that’s really useful, being able to see what the error actually is helps a lot.

As you say, these are locale issues, so you _probably_ need to RDEPEND on the right packages.  For example, glib-2.0-ptest RDEPENDS on glibc-gconv-utf-32 and locale-base-fr-fr to pull in UTF-32 encoding and fr_FR locale support.

Ross
Julien Stephan July 6, 2023, 12:39 p.m. UTC | #2
On Wed, Jul 05, 2023 at 03:52:00PM +0000, Ross Burton wrote:
> Hi Julien,
>
> > On 5 Jul 2023, at 16:31, Julien Stephan via lists.openembedded.org <jstephan=baylibre.com@lists.openembedded.org> wrote:
> > So before test code gets bundled into the release tarballs, switch to
> > github URI.
> >
>
> Please split this into a separate commit, so we can review the change to git separately from the addition of ptest.
>

Hi Ross,
done in v2!

> > FAIL: chinese1.lt
> > FAIL: utf8-2.txt.lt
>
> If there’s a way to make the tests more verbose when they fail then that’s really useful, being able to see what the error actually is helps a lot.
>

I found an option to be verbose an error, I'll add it in a v4.

> As you say, these are locale issues, so you _probably_ need to RDEPEND on the right packages.  For example, glib-2.0-ptest RDEPENDS on glibc-gconv-utf-32 and locale-base-fr-fr to pull in UTF-32 encoding and fr_FR locale support.
>

thank you for pointing this out. I fixed the issue using
locale-base-en-us as RDEPENDS. Fixed in v3.

Best
Julien


> Ross