[Top][All Lists]

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

Re: What does setting TEST_LOGS mean?

From: Roman Neuhauser
Subject: Re: What does setting TEST_LOGS mean?
Date: Thu, 21 May 2015 10:12:13 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

# address@hidden / 2015-05-20 17:00:57 -0700:
> 15.2.3 Parallel Test Harness
> You can set the TEST_LOGS variable. By default, this variable is computed at
> make run time from the value of TESTS as described above. For example, you
> can use the following:
> set x subset*.log; shift
> env TEST_LOGS="foo.log $*" make -e check
> What does setting TEST_LOGS do?

it overrides the definition present in the Makefile.

> It is read only in the Makefile file.


> Suppose Makefile looks something like:
>    TESTS = foo.exe
> Then
>    TEST_LOGS = foo.log
> And the user sets this to
>    env TEST_LOGS = bar.log make -e check
> What on earth does this mean?

first, it would have to be

  env TEST_LOGS=bar.log make -e check

(no ws around the equals sign).

second, it looks like a pilot error, and i would expect make to produce
an error.

> And what does 'set x subset*.log; shift' have to do with anything. It looks
> like something erroneously removed from an existing script and put in the
> document.

that's just defensive shell script programming.  if no files match the
pattern, it will expand to nothing, and "set" with no options or arguments
produces a list of all parameters (variables) defined in the current
shell environment (instead of setting argc = 0, argv = {}.  to prevent
this mishap you need to ensure that "set" sees at least one argument,
and then shift it off the beginning of argv.


reply via email to

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