[Top][All Lists]

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

Re: Question on --test-name=NAME

From: Gavin Smith
Subject: Re: Question on --test-name=NAME
Date: Sun, 26 Apr 2015 19:19:10 +0100

On 26 April 2015 at 18:39, Arthur Schwarz <address@hidden> wrote:
> Now for the case you mentioned in identifying a program, which is really a
> test case renamed in the manual for mystifying and unknowable reasons. Well,
> there is no mechanism for "The first non-option argument passed to the test
> driver is the program to be run, and all the following ones are command-line
> options and arguments for this program." Let's go through some of options.
> Suppose command line arguments are input on the command line (seems
> reasonable huh).

I think you are wrong there. When it says command-line, it means a
command line in a Makefile recipe. You will see it by looking at any generated from a with tests. It will look

t/ t/
        @p='t/'; \
        b='t/'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS)
        "$$tst" $(AM_TESTS_FD_REDIRECT)

You can see the command-line options like --test-name etc.

> Note that none of the command line inputs are identified or
> described in the make help file (make --help) or the make man pages (man
> make). I haven't looked at info make but, things being what they are, their
> probably not there either. So, since the manual doesn't describe how or what
> to do I guess we get to make it all up.

As I said before, they are not options typed in by a user invoking "make".

> In the
> question was asked as to how a program (test script) is to be entered. Let's
> see.
> Option 1: make program check
> Option 2: make program
> Option 3: make --test-name=NAME program check
> Option 4: make --test-name=NAME check
> Option 5: make program --test-name=NAME check
> Option 6: you can't do it
> Pick one or invent your own! That's how the command line options must be
> input. I can't think of another way.

They are input by automatically generated makefile rules - see above.

> Oh, about the example. The automake variable can't be used for anything but
> scripts, see 15 Support for test suites "The other (and most used) form is
> based on the use of generic test scripts, and its activation is triggered by
> the definition of the special TESTS variable." This quite clearly says that
> anytime that a TESTS variable is seen then generic scripts are used. But the
> example has "TESTS = baz" which are not generic scripts. It
> must mean that the test driver is a generic script, but oh wait. The test
> drivers are for PERL and PYTHON and scripts. And (last time I looked) PERL
> and PYTHON were not generic scripts.

They could be run the same way as shell scripts, as long as they have
the right "#!" header.

reply via email to

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