sed-devel
[Top][All Lists]
Advanced

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

Re: How to run tests for sed?


From: Assaf Gordon
Subject: Re: How to run tests for sed?
Date: Mon, 13 Mar 2017 01:33:36 -0400

Hello,

> On Mar 12, 2017, at 23:35, kk <address@hidden> 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 <sed>/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 = \
     $(RECURSIVE_TARGETS) \
     $(RECURSIVE_CLEAN_TARGETS) \
     $(am__extra_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
issues.

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,

regards,
  - assaf





reply via email to

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