15.2.1 Scripts-based Testsuites If the special variable TESTS is defined, its value is taken to be a list of programs or scripts to run in order to do the testing. Under the appropriate circumstances, it's possible for TESTS to list also data files to be passed to one or more test scripts defined by different means (the so-called "log compilers", see Parallel Test Harness).
If I define: LOG_DRIVER = myscript.sh TESTS = data What happens? If I define: (the tap-driver.sh is a custom driver by definition) TEST_EXTENSIONS = .sh LOG_DRIVER = tap-driver.sh SH_LOG_DRIVER = tap-driver.sh TESTS = data script.sh Then is seems that the test harness would have to do: cat data | tap-driver.sh ./script.sh | tap-driver.sh Because the awk loop in tap-driver.sh does a getline which reads from an input pipe (stdin). Have I read the code and the document correctly? This is really confusing to me. In 15.3.3.1 Command-line arguments for test drivers the manual says "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." Which seems to mean that for custom drivers we get for: TEST_EXTENSIONS = SH SH_LOG_DRIVER = custom_driver LOG_DRIVER = custom_driver TESTS = program test.sh Which should execute as: custom_driver test_harness_options program custom_driver test_harness_options test.sh Which is certainly not done with the tap-driver. So what in tarnation is going on? The manual make very clear how to input a data file. For example If I define: TESTS = script.sh Then according to: 15.2.1 Scripts-based Testsuites "Test programs that need data files should look for them in srcdir (which is both a make variable and an environment variable made available to the tests), so that they work when building in a separate directory (see Build Directories in The Autoconf Manual), and in particular for the distcheck rule (see Checking the Distribution)." So it seems clear what to do if script.sh needs a data file.
