In 15.2.2 Older (and discouraged) serial test harness there is an example of:
TESTS_ENVIRONMENT = $(PERL) -Mstrict -w TESTS = foo.pl bar.pl baz.pl I haven't written a little Makefile.am to test some conjectures (a pedantic 'guess). The example seems to indicate that the (undefined) $(PERL) compiles all the programs in TESTS and these programs can only be perl programs. But since perl requires a shebang (#!/usr/bin/perl) as the first executable line, the execution might as well be from calling the program from bash. How do I determine that program execution is from using the TESTS_ENVIRONMENT variable and not from a direct call to bash? The appearance is that when TESTS_ENVIRONMENT is used then the only tests allowed in TESTS are perl programs. Since shell script and perl programs both have the first line as the shebang, how can I verify that when TESTS contains a mixed bag of test programs that the TESTS_ENVIRONMENT perl compiler is called? Or is the assumption that the example requires that when TESTS_ENVIRONMENT is used that the TESTS variable only reference test programs which can be compiled by the TESTS_ENVIRONMENT compiler incorrect? I have tried both with TESTS = perl_program and TESTS = perl_program bash_script with the same result. The basic question is how is the association between the compiler in TESTS_ENVIRONMENT and the test program in TESTS made. In parallel processing this association is made explicit using TEST_EXTENSIONS and the various ext_SOMETHING. There is no clear rule here other than an example which leaves as many questions as it answers. Art =================== Makefile.am =================== ## Process this file with automake to produce Makefile.in # select testing format AUTOMAKE_OPTIONS = serial-tests # set compiler for perl program TESTS_ENVIRONMENT = /usr/bin/perl # Testing check_SCRIPTS = test1.sh hello.pl TESTS = $(check_SCRIPTS) test1.sh: echo '#!/bin/bash' > test1.sh echo "echo 'PASS: 0'" >> test1.sh echo "exit 0" >> test1.sh chmod +x test1.sh hello.pl: echo "#!/usr/bin/perl" > hello.pl echo "use warnings; " >> hello.pl echo 'print "Hello, World!\n";' >> hello.pl echo "exit 0;" >> hello.pl chmod +x hello.pl CLEANFILES = $(test_SOURCES)