]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Unity cleanup
authorHarlan Stenn <stenn@ntp.org>
Thu, 18 Jun 2015 07:49:21 +0000 (07:49 +0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 18 Jun 2015 07:49:21 +0000 (07:49 +0000)
bk: 55827801WgyNj9SD2-EElz3OTdgf-Q

sntp/tests/Makefile.am
sntp/tests/run-test-keyFile.c [deleted file]
sntp/tests/run-test-kodDatabase.c [deleted file]
sntp/tests/run-test-networking.c [deleted file]

index cb8d48de998a175c816154bf58d69e1dc11f91d8..052f50e249d260b2a1516ba7fcb539b4d644f61d 100644 (file)
@@ -1,27 +1,29 @@
-NULL =
+NUL =
 BUILT_SOURCES =
 CLEANFILES =
+EXTRA_PROGRAMS =
 
 run_unity =    cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
 
+EXTRA_PROGRAMS +=      test-networking 
+EXTRA_PROGRAMS +=      test-keyFile
+
 check_PROGRAMS =               \
-       test-networking         \
-       test-kodDatabase
+       test-kodDatabase        \
        $(NULL)
-#      test-keyFile
 
 if GTEST_AVAILABLE
 check_PROGRAMS += tests
 else
-EXTRA_PROGRAMS = tests
+EXTRA_PROGRAMS += tests
 endif
 
 #if BUILD_SNTP
 #check_PROGRAMS += tests
 #endif
 
-base_SOURCES =                         \
-       $(srcdir)/../tests_main.cpp     \
+base_SOURCES =                 \
+       tests_main.cpp          \
        $(NULL)
 
 tests_SOURCES =                        \
@@ -101,18 +103,18 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP)
 AM_LDFLAGS = $(LDFLAGS_NTP)
 
 
-BUILT_SOURCES +=                                       \
-       $(srcdir)/networking.c run-networking.c         \
-       $(srcdir)/kodDatabase.c run-kodDatabase.c       \
-       $(srcdir)/run-keyFile.c                         \
+BUILT_SOURCES +=                       \
+       $(srcdir)/run-networking.c      \
+       $(srcdir)/run-kodDatabase.c     \
+       $(srcdir)/run-keyFile.c         \
        $(NULL)
 
-test_networking_CFLAGS =                       \
-       -I$(top_srcdir)/unity                   \
+test_networking_CFLAGS =               \
+       -I$(top_srcdir)/unity           \
        $(NULL)
 
-test_networking_LDADD =                                \
-       $(unity_tests_LDADD)                    \
+test_networking_LDADD =                        \
+       $(unity_tests_LDADD)            \
        $(NULL)
 
 test_kodDatabase_CFLAGS =              \
@@ -145,7 +147,7 @@ test_kodDatabase_SOURCES =          \
 
 test_keyFile_SOURCES =                 \
        keyFile.c                       \
-       run-keyFile.c           \
+       run-keyFile.c                   \
        $(NULL)
 
 $(srcdir)/run-networking.c: $(srcdir)/networking.c $(std_unity_list)
diff --git a/sntp/tests/run-test-keyFile.c b/sntp/tests/run-test-keyFile.c
deleted file mode 100644 (file)
index a87c229..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* AUTOGENERATED FILE. DO NOT EDIT. */
-
-//=======Test Runner Used To Run Each Test Below=====
-#define RUN_TEST(TestFunc, TestLineNum) \
-{ \
-  Unity.CurrentTestName = #TestFunc; \
-  Unity.CurrentTestLineNumber = TestLineNum; \
-  Unity.NumberOfTests++; \
-  if (TEST_PROTECT()) \
-  { \
-      setUp(); \
-      TestFunc(); \
-  } \
-  if (TEST_PROTECT() && !TEST_IS_IGNORED) \
-  { \
-    tearDown(); \
-  } \
-  UnityConcludeTest(); \
-}
-
-//=======Automagically Detected Files To Include=====
-#include "unity.h"
-#include <setjmp.h>
-#include <stdio.h>
-
-//=======External Functions This Runner Calls=====
-extern void setUp(void);
-extern void tearDown(void);
-
-
-//=======Test Reset Option=====
-void resetTest()
-{
-  tearDown();
-  setUp();
-}
-
-char *progname;
-
-
-//=======MAIN=====
-int main(int argc, char *argv[])
-{
-  progname = argv[0];
-  Unity.TestFile = "keyFile.c";
-  UnityBegin("keyFile.c");
-
-  return (UnityEnd());
-}
diff --git a/sntp/tests/run-test-kodDatabase.c b/sntp/tests/run-test-kodDatabase.c
deleted file mode 100644 (file)
index 7fc9678..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* AUTOGENERATED FILE. DO NOT EDIT. */
-
-//=======Test Runner Used To Run Each Test Below=====
-#define RUN_TEST(TestFunc, TestLineNum) \
-{ \
-  Unity.CurrentTestName = #TestFunc; \
-  Unity.CurrentTestLineNumber = TestLineNum; \
-  Unity.NumberOfTests++; \
-  if (TEST_PROTECT()) \
-  { \
-      setUp(); \
-      TestFunc(); \
-  } \
-  if (TEST_PROTECT() && !TEST_IS_IGNORED) \
-  { \
-    tearDown(); \
-  } \
-  UnityConcludeTest(); \
-}
-
-//=======Automagically Detected Files To Include=====
-#include "unity.h"
-#include <setjmp.h>
-#include <stdio.h>
-
-//=======External Functions This Runner Calls=====
-extern void setUp(void);
-extern void tearDown(void);
-extern void test_SingleEntryHandling();
-extern void test_MultipleEntryHandling();
-extern void test_NoMatchInSearch();
-extern void test_AddDuplicate();
-extern void test_DeleteEntry();
-
-
-//=======Test Reset Option=====
-void resetTest()
-{
-  tearDown();
-  setUp();
-}
-
-char *progname;
-
-
-//=======MAIN=====
-int main(int argc, char *argv[])
-{
-  progname = argv[0];
-  Unity.TestFile = "kodDatabase.c";
-  UnityBegin("kodDatabase.c");
-  RUN_TEST(test_SingleEntryHandling, 22);
-  RUN_TEST(test_MultipleEntryHandling, 35);
-  RUN_TEST(test_NoMatchInSearch, 66);
-  RUN_TEST(test_AddDuplicate, 79);
-  RUN_TEST(test_DeleteEntry, 104);
-
-  return (UnityEnd());
-}
diff --git a/sntp/tests/run-test-networking.c b/sntp/tests/run-test-networking.c
deleted file mode 100644 (file)
index d5e822c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* AUTOGENERATED FILE. DO NOT EDIT. */
-
-//=======Test Runner Used To Run Each Test Below=====
-#define RUN_TEST(TestFunc, TestLineNum) \
-{ \
-  Unity.CurrentTestName = #TestFunc; \
-  Unity.CurrentTestLineNumber = TestLineNum; \
-  Unity.NumberOfTests++; \
-  if (TEST_PROTECT()) \
-  { \
-      setUp(); \
-      TestFunc(); \
-  } \
-  if (TEST_PROTECT() && !TEST_IS_IGNORED) \
-  { \
-    tearDown(); \
-  } \
-  UnityConcludeTest(); \
-}
-
-//=======Automagically Detected Files To Include=====
-#include "unity.h"
-#include <setjmp.h>
-#include <stdio.h>
-
-//=======External Functions This Runner Calls=====
-extern void setUp(void);
-extern void tearDown(void);
-
-
-//=======Test Reset Option=====
-void resetTest()
-{
-  tearDown();
-  setUp();
-}
-
-char *progname;
-
-
-//=======MAIN=====
-int main(int argc, char *argv[])
-{
-  progname = argv[0];
-  Unity.TestFile = "networking.c";
-  UnityBegin("networking.c");
-
-  return (UnityEnd());
-}