[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on AM_TAP_AWK
Re: Question on AM_TAP_AWK
Tue, 07 Apr 2015 15:57:45 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
On 04/07/2015 03:30 PM, Arthur Schwarz wrote:
> TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
> AM_TAP_AWK is defined right there, in the example code. Its purpose is
> to tell the tap-driver.sh program which AWK program to use.
> -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) Hey
[Your mail client has the horrible habit of breaking threading, as well
as doing poor quoting of the text you are responding to. Then the fact
that you stuck your entire reply after a '-- ' separator meant that sane
mail clients treat your entire content as part of a signature, which
means it gets truncated by default; the only way I could reply to your
text was to select the entire message before replying, but that in turn
triggers a "feature" in my mail client that loses all line breaks in the
signature, making this harder to read]
> thanks; I guess what your saying is that the variable needs no
> definition; it's self-defining. Does this mean that the TAP interface
> needs this variable only under some circumstances but not under all?
If I understand correctly, you only need to set AM_TAP_AWK in your
makefile if you want to allow the user to select a different awk than
what a PATH search would normally find, as that is what tap-driver.sh
does when the variable is not set.
> Since it is self-defined within an example and not in some text which
> defines the TAP interface I suppose that it is only required sometimes,
> otherwise the TAP interface would have it as part of its description.
> I'm also a bit confused about the use of env. Does this use mean that
> Makefile evaluates TEST_LOG_DRIVER by escaping to a shell? Otherwise,
> does Makefile do it's own interpretation of 'env'? the reason that I'm
> asking this question is that on env Cygwin (8.23-4) manual page (and env
> --help) shows: SYNOPSIS env [OPTION]... [-] [NAME=VALUE]... [COMMAND
> [ARG]...] which seems to imply that either we have NAME=VALUE or NAME=.
> The example shows $(SHELL) which has neither of these. I suppose that
The example shows that you are executing $(SHELL) as the COMMAND, with
the environment variable AM_TAP_AWK pre-set to a value. The use of
'env' allows use with makefiles that default to executing some other
shell than 'sh' (most likely to be the case on windows systems, but
non-standard behavior since POSIX standardized make to always use sh).
> when $(SHELL) is evaluated it produces some variable name (?) but if it
> does, how does TAP determine what this name is from the environment?
It produces a command name, not a variable name (namely, the command is
the shell to use for interpreting the shell script).
> Does it search the environment for a fixed set of names and then assume
> success at the first one found? Can I supply TAP with a shell whose name
> is not one of the fixed set of names? Anyhow, I'm abandoning TAP and
> going to try to use the Custom Drivers and hope that if the definitions
> are not clearer then at least I can get some sort of test going. If that
> doesn't work then I will distribute my software with no testing. Thanks
> art The failure of the past is the challenge of the present and the
> success of the future.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature