]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Sun, 21 Jun 2015 05:15:32 +0000 (05:15 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sun, 21 Jun 2015 05:15:32 +0000 (05:15 +0000)
bk: 55864874pl4SbZTTjZkOvnRjohG09A

ChangeLog
sntp/configure.ac
sntp/tests/fileHandlingTest.h.in [moved from sntp/tests/fileHandlingTest.h with 87% similarity]

index a3d7949c763ea4b0e7b120111d7ba2ec9771418e..022f39664382e1040fb6b642a65db8b033d1e53c 100644 (file)
--- 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.
index bcd592060ed0f12f57d3740fe6ef310715f701d3..c0c98dce91fce1194f33e90d06b9264f2f4348a6 100644 (file)
@@ -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
similarity index 87%
rename from sntp/tests/fileHandlingTest.h
rename to sntp/tests/fileHandlingTest.h.in
index 0821c2e5d45d54fa61d56860c119d8fb82a6f510..911142628deba1d53a687cebcaab0fb340fcbf2f 100644 (file)
@@ -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);