diff options
author | Werner Koch <wk@gnupg.org> | 2015-09-10 18:11:58 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-09-10 18:12:20 +0200 |
commit | e92a8ab021672b19e5cd397fa555fcc8a3401e8b (patch) | |
tree | dbf55296b6539a5d0c54246d1706501949618c14 /g10/t-keydb.c | |
parent | g10: Improve portability of the new test driver. (diff) | |
download | gnupg2-e92a8ab021672b19e5cd397fa555fcc8a3401e8b.tar.xz gnupg2-e92a8ab021672b19e5cd397fa555fcc8a3401e8b.zip |
g10: Fix make distcheck problem.
* g10/test.c: Include string.h.
(prepend_srcdir): New. Taken from Libgcrypt.
(test_free): New.
* g10/t-keydb.c (do_test): Malloc the filename.
* g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR
(EXTRA_DIST): Add t-keydb-keyring.kbx.
--
Using SOURCE_DIR should in general work but we have seen problems when
doing this in Libgcrypt. Using the srcdir variable gives us anyway
more flexibility and aligns with the way we do it in tests/openpgp.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/t-keydb.c')
-rw-r--r-- | g10/t-keydb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/t-keydb.c b/g10/t-keydb.c index 634cb05a7..17a76111d 100644 --- a/g10/t-keydb.c +++ b/g10/t-keydb.c @@ -30,11 +30,14 @@ do_test (int argc, char *argv[]) KBNODE kb1, kb2; char *uid1; char *uid2; + char *fname; (void) argc; (void) argv; - rc = keydb_add_resource (SOURCE_DIR "/t-keydb-keyring.kbx", 0); + fname = prepend_srcdir ("t-keydb-keyring.kbx"); + rc = keydb_add_resource (fname, 0); + test_free (fname); if (rc) ABORT ("Failed to open keyring."); |