[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUism in groff tests

From: G. Branden Robinson
Subject: Re: GNUism in groff tests
Date: Fri, 17 Jan 2020 18:03:11 +1100
User-agent: NeoMutt/20180716

At 2019-12-31T09:02:52+0000, Ralph Corderoy wrote:
> It looks like the test harness needs a common shell script that provides
> convenience functions.  Then the test script can read more like
>     # All run under `set -eu' with a trap on EXIT.
>     title 'Check -Tlatin1's \(oq'
>     in=$(tmp) want=$(tmp)   # Values won't need quoting.
>     cat >$in <<\E
>     .pl 1
>     \e(oq = \(oq
>     E
>     echo '\(oq = `' >$want
>     got=$(tmp) err=$(tmp)
>     run "$groff" -Tlatin <$in >$got 2>$err   # Allows inserting valgrind(1).
>     empty $err
>     equal $got $want   # If different, shows start of diff output.
>     cleanup   # Removes tmp files if tests successful.
> with the functions evolving over time to suit groff's needs, and
> presumably fitting in with Automake's parallel-test harness, if that's
> what's being used.

Hi Ralph,

I wanted to reply to this just as a kind of group memorandum that this
is worth considering.  The only reason I haven't implemented a "common
test shell library" already is that all the test scripts right now have
some flexibility with respect to where they run from.  You can run them
from the top of the build tree, which is what I think Automake does, or
you can run them from the directory in which they're housed, which is
handy for developing them.

So the trouble is, once the tests have (another) external dependency,
they have to be able to locate it so they can source it.  It's a
solvable problem; I just haven't wanted to fool with the tedium of it

And yes, we definitely use Automake's parallel-test harness.

make -j check

is much faster than

make check

on my 4-core machine!

It's especially nice because that danged old hdtbl test takes more time
than all the other tests put together.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]