[Top][All Lists]

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

How are data files input for to custom drivers?

From: Arthur Schwarz
Subject: How are data files input for to custom drivers?
Date: Wed, 27 May 2015 14:27:53 -0700

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:
TESTS = data

What happens?

If I define: (the is a custom driver by definition)
TESTS = data

Then is seems that the test harness would have to do: 
cat data |
./ |

Because the awk loop in 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 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:

SH_LOG_DRIVER = custom_driver
LOG_DRIVER = custom_driver
TESTS = program

Which should execute as:
custom_driver test_harness_options program
custom_driver test_harness_options

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:

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 needs a data file.

reply via email to

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