diff options
author | Justus Winter <justus@g10code.com> | 2017-03-22 12:40:42 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-04-24 14:14:05 +0200 |
commit | ed4d23d75e8ba89e998b88a4f862661c81f665a3 (patch) | |
tree | 7e956da634802ab2d802f5e5d9e208932d606926 /g10/test.c | |
parent | gpgscm: Move 'trace' and 'stringify'. (diff) | |
download | gnupg2-ed4d23d75e8ba89e998b88a4f862661c81f665a3.tar.xz gnupg2-ed4d23d75e8ba89e998b88a4f862661c81f665a3.zip |
tests: Locate resources and scripts relative to top source dir.
--
Locate every resource and every script used in the tests using a path
relative to the top of the source tree.
This is a purely mechanical change, mostly done using regular
expressions, with a few manual fixups here and there.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'g10/test.c')
-rw-r--r-- | g10/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/test.c b/g10/test.c index 734458af3..375f361a7 100644 --- a/g10/test.c +++ b/g10/test.c @@ -154,12 +154,12 @@ prepend_srcdir (const char *fname) static const char *srcdir; char *result; - if (!srcdir && !(srcdir = getenv ("srcdir"))) + if (!srcdir && !(srcdir = getenv ("abs_top_srcdir"))) srcdir = "."; - result = malloc (strlen (srcdir) + 1 + strlen (fname) + 1); + result = malloc (strlen (srcdir) + strlen ("/g10/") + strlen (fname) + 1); strcpy (result, srcdir); - strcat (result, "/"); + strcat (result, "/g10/"); strcat (result, fname); return result; } |