[Top][All Lists]

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

Re: How to deal with test data in ouf of source tree builds?

From: Bob Friesenhahn
Subject: Re: How to deal with test data in ouf of source tree builds?
Date: Thu, 15 Jun 2017 10:41:43 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Thu, 15 Jun 2017, Nick Bowler wrote:

I suggest eliminating the dependency on the working directory completely.

For example, you can pass the location of necessary data files to the
test programs via environment variable(s) or command-line arguments.  If
all your data files are in one place this might be something simple like:

 UNBOUND_TEST_DATA=${srcdir}/testdata ./the_test_program

and the test program can construct filenames based on that environment

Environment variables are convenient. Command line arguments to the test program are also convenient. If the test program is also the installed program, take care that security or reliability issues are not introduced due to responding to environment variables.

Microsoft Windows has very limited command line plus environment space (come out of same allocation) so take care not to use so much resources that it is not possible to run the tests under Windows (if Windows is supported).

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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