From ed4d23d75e8ba89e998b88a4f862661c81f665a3 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 22 Mar 2017 12:40:42 +0100 Subject: 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 --- g10/test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'g10/test.c') 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; } -- cgit v1.2.3