From: Damir Tomic Date: Fri, 19 Jun 2015 21:15:36 +0000 (+0200) Subject: Makefile.am: X-Git-Tag: NTP_4_3_43~2^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0732e848dcec7b8d6bbfae8d0c40730f757df908;p=thirdparty%2Fntp.git Makefile.am: added some clean and distclean stuff c_fileHandlingTest.h: added more debug printfs kodFile.c: changed CreatePath so new files are written in a writeable directory bk: 55848678PgOoh3X8KTDDLTQ06jKSNg --- diff --git a/sntp/tests/Makefile.am b/sntp/tests/Makefile.am index d8e029748..b9180c901 100644 --- a/sntp/tests/Makefile.am +++ b/sntp/tests/Makefile.am @@ -1,6 +1,7 @@ NULL = BUILT_SOURCES = -CLEANFILES = +CLEANFILES = kod-output-blank kod-output-single kod-output-multiple +DISTCLEANFILES = kod-output-blank kod-output-single kod-output-multiple EXTRA_PROGRAMS = run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb diff --git a/sntp/tests/c_fileHandlingTest.h b/sntp/tests/c_fileHandlingTest.h index e3f76d570..cd1756d7e 100644 --- a/sntp/tests/c_fileHandlingTest.h +++ b/sntp/tests/c_fileHandlingTest.h @@ -47,7 +47,7 @@ const char * CreatePath(const char* filename, enum DirectoryType argument) { strcpy(path,"../../../../sntp/tests/data/"); } - + //strcpy(path,""); strcat(path,filename); printf("PATH IS : %s\n",path); return path; diff --git a/sntp/tests/kodFile.c b/sntp/tests/kodFile.c index feb648894..ceacf2fd3 100644 --- a/sntp/tests/kodFile.c +++ b/sntp/tests/kodFile.c @@ -74,8 +74,9 @@ void test_ReadFileWithBlankLines() { } void test_WriteEmptyFile() { - kod_db_file = estrdup(CreatePath("kod-output-blank", OUTPUT_DIR)); - printf("kod PATH: %s\n",kod_db_file); + //kod_db_file = estrdup(CreatePath("kod-output-blank", OUTPUT_DIR)); + kod_db_file = estrdup("kod-output-blank"); + printf("kod PATH: %s\n",kod_db_file); write_kod_db(); // Open file and ensure that the filesize is 0 bytes. @@ -89,7 +90,8 @@ void test_WriteEmptyFile() { } void test_WriteFileWithSingleEntry() { - kod_db_file = estrdup(CreatePath("kod-output-single", OUTPUT_DIR)); + //kod_db_file = estrdup(CreatePath("kod-output-single", OUTPUT_DIR)); + kod_db_file = estrdup("kod-output-single"); printf("kod PATH: %s\n",kod_db_file); add_entry("host1", "DENY"); @@ -112,7 +114,8 @@ void test_WriteFileWithSingleEntry() { } void test_WriteFileWithMultipleEntries() { - kod_db_file = estrdup(CreatePath("kod-output-multiple", OUTPUT_DIR)); + //kod_db_file = estrdup(CreatePath("kod-output-multiple", OUTPUT_DIR)); + kod_db_file = estrdup("kod-output-multiple"); printf("kod PATH: %s\n",kod_db_file); add_entry("example.com", "RATE"); add_entry("192.0.2.1", "DENY"); diff --git a/sntp/tests/run-kodFile.c b/sntp/tests/run-kodFile.c index 87b825d85..9c5896263 100644 --- a/sntp/tests/run-kodFile.c +++ b/sntp/tests/run-kodFile.c @@ -54,8 +54,8 @@ int main(int argc, char *argv[]) RUN_TEST(test_ReadCorrectFile, 35); RUN_TEST(test_ReadFileWithBlankLines, 53); RUN_TEST(test_WriteEmptyFile, 76); - RUN_TEST(test_WriteFileWithSingleEntry, 91); - RUN_TEST(test_WriteFileWithMultipleEntries, 114); + RUN_TEST(test_WriteFileWithSingleEntry, 92); + RUN_TEST(test_WriteFileWithMultipleEntries, 116); return (UnityEnd()); }