Hello Paul,

On 2017-06-15, Paul Menzel <pmen...@molgen.mpg.de> wrote:
> When doing an out of source build of Unbound, the test suite fails
[...]
> In the source directory there is a directory `testdata`, and that gets
> referenced incorrectly in `testcode/unitverify.c`.
[...]
>          verifytest_file("testdata/test_signatures.1", "20070818005004");
[...]
> Unfortunately, I couldn’t find any documentation how to deal with test
> data when building out of the source tree. Should the test data be
> copied to the build directory, despite it being not changed, should it
> be linked, or does the code need to reference only absolute paths, and
> therefore has to be preprocessed(?)?

There are many possible solutions.  The simplest is probably to cd into
the source directory before running the test programs.  But this may have
other undesired effects.

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
variable.

Cheers,
  Nick

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to