mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
f03d6897be
commit
ed4d23d75e
87 changed files with 208 additions and 182 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue