diff options
Diffstat (limited to 'common/ini/ini_config_ut.c')
-rw-r--r-- | common/ini/ini_config_ut.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/ini/ini_config_ut.c b/common/ini/ini_config_ut.c index 7aa59405..bcb47e6d 100644 --- a/common/ini/ini_config_ut.c +++ b/common/ini/ini_config_ut.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <stdio.h> #include <errno.h> +#include <unistd.h> #define TRACE_HOME #include "ini_config.h" #include "collection.h" @@ -801,6 +802,16 @@ int main(int argc, char *argv[]) { int error; + char *srcdir; + + srcdir = getenv("srcdir"); + if(srcdir) { + if(chdir(srcdir) == 0) { + error = errno; + return error; + } + } + if ((error = basic_test()) || (error = single_file()) || (error = real_test(NULL)) || |