[gnu-sed-devel] Re: How to run tests for sed?


> On Mar 12, 2017, at 23:35, kk  wrote:
> Thanks first, I have some doubt about the Makefile.in file.

I would recommend avoiding dealing with 'Makefile.in' directly, unless
you are interested (or troubleshooting) the nitty-gritty details
of GNU automake. It is automake that reads /testsuite/local.mk
and generates (lots of) targets that eventually help 'make check' "just work".

In ./testsuite/local.mk  every item listed to the TESTS variable will
become a test when running 'make check' - regardless
of whether it is a recursive build system or not.

> I see the target "check", it's rule was : $(MAKE) $(AM_MAKEFLAGS) check-recursive, but the check-recursive was a member of RECURSIVE_TARGETS, how it find and build the tests?

This is part of automake's complicated system.
I do not claim to be an automake expert, but I can offer some pointers:

If you run "make --just-print check-recursive" you'll see:

    $ make --just-print check-recursive
    target=`echo check-recursive | sed s/-recursive//`;

This command is part of a target definition of "$(am__recursive_targets)",
which expands to multiple targets (including 'check-recursive').

This variable is created with:
   am__recursive_targets = \

And 'RECURSIVE_TARGETS' iteslf contains 'check-recursive':

     RECURSIVE_TARGETS = all-recursive check-recursive [...]

Again, I wouldn't recommend going down that path unless you are debugging automake

Running 'make check' should build programs required for testing (there are only
two small C programs needed for the tests), and then executes the actual tests
(which are shell scripts and do not require any building).

If there is a problem in the tests (e.g. a test that does not execute correctly),
please report it - it's a bug.

Two known bugs regarding tests are running tests under windows, and
enabling the old regex extended tests - currently there is no fix for this issues (patches welcomed).

If you'd like to add tests - please add them to ./testsuite/local.mk,
not to Makefile.in directly.

Hope this helps,

  - assaf

This message from: http://www.mailbrowse.com/gnu-sed-devel/245.html
Previous message: Patch for sed- on mingw-w64
Next message:Re: How to run tests for sed?