On 26 April 2015 at 18:39, Arthur Schwarz <aschwarz1...@att.net> 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 Makefile.in generated from a Makefile.am with tests. It will look like: t/file.sh.log: t/file.sh @p='t/file.sh'; \ b='t/file.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$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 http://lists.gnu.org/archive/html/automake/2015-04/msg00022.html 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 = foo.pl bar.py 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.