From: Harlan Stenn Date: Sun, 21 Jun 2015 05:15:32 +0000 (+0000) Subject: Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. X-Git-Tag: NTP_4_3_43~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2427ab5bcf811116d75dd1221fdb3c9dc3c21f91;p=thirdparty%2Fntp.git Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. bk: 55864874pl4SbZTTjZkOvnRjohG09A --- diff --git a/ChangeLog b/ChangeLog index a3d7949c7..022f39664 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ * [Bug 2845] Harden memory allocation in ntpd. * [Bug 2852] 'make check' can't find unity.h. Hal Murray. * [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida. +* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. * Report select() debug messages at debug level 3 now. * sntp/scripts/genLocInfo: treat raspbian as debian. * Unity test framework fixes. diff --git a/sntp/configure.ac b/sntp/configure.ac index bcd592060..c0c98dce9 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -151,6 +151,7 @@ AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([include/Makefile]) AC_CONFIG_FILES([scripts/Makefile]) AC_CONFIG_FILES([tests/Makefile]) +AC_CONFIG_FILES([tests/fileHandlingTest.h]) AC_CONFIG_FILES([unity/Makefile]) AC_OUTPUT diff --git a/sntp/tests/fileHandlingTest.h b/sntp/tests/fileHandlingTest.h.in similarity index 87% rename from sntp/tests/fileHandlingTest.h rename to sntp/tests/fileHandlingTest.h.in index 0821c2e5d..911142628 100644 --- a/sntp/tests/fileHandlingTest.h +++ b/sntp/tests/fileHandlingTest.h.in @@ -35,17 +35,9 @@ const char * CreatePath(const char* filename, enum DirectoryType argument) { if (getcwd(cwd, sizeof(cwd)) != NULL) printf("Current working dir: %s\n", cwd); - if(strstr(cwd,"sub/") == NULL){ - strcpy(path,"../../../sntp/tests/data/"); - } - else - if(strstr(cwd,"_build") == NULL){ //if it's run as make distcheck, it's in a different directory! - strcpy(path,"../../../sntp/tests/data/"); - } - - else { - strcpy(path,"../../../../sntp/tests/data/"); - } + printf("builddir is <@builddir@>\n"); + printf("srcdir is <@srcdir@>\n"); + strcpy(path,"@srcdir@/data/"); //strcpy(path,""); strcat(path,filename);