]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Makefile.am:
authorDamir Tomic <viperus@ntp.org>
Mon, 3 Aug 2015 09:43:07 +0000 (11:43 +0200)
committerDamir Tomic <viperus@ntp.org>
Mon, 3 Aug 2015 09:43:07 +0000 (11:43 +0200)
  changed signdT -> t-ntp_signd. All tests files will from now on be named t-name.c , where name.c is the name of the tested file.
run-ntp_signdT.c~8aba306cc0dcbfc:
  Delete: tests/ntpd/run-ntp_signdT.c
run-t-ntp_signd.c:
  Rename: tests/ntpd/run-ntp_signd.c -> tests/ntpd/run-t-ntp_signd.c
t-ntp_signd.c:
  Rename: tests/ntpd/ntp_signdT.c -> tests/ntpd/t-ntp_signd.c

bk: 55bf37abpz6o-kYXRqJ4Aqv9zaKaVQ

tests/ntpd/Makefile.am
tests/ntpd/run-ntp_signdT.c [deleted file]
tests/ntpd/run-t-ntp_signd.c [moved from tests/ntpd/run-ntp_signd.c with 100% similarity]
tests/ntpd/t-ntp_signd.c [moved from tests/ntpd/ntp_signdT.c with 100% similarity]

index 589ad655c260b247b4858a1e449707acf50e1013..f64b4fc08000d47dc4b8a39f2ff9fef3e06c0f2c 100644 (file)
@@ -15,7 +15,7 @@ check_PROGRAMS =              \
        test-ntp_util       \
        test-rc_cmdlength       \
        test-ntp_scanner        \
-       test-ntp_signdT         \
+       test-ntp_signd          \
        $(NULL)
 
 #      test-ntp_signd          \ #doesn't work, can't link it because you can't link static function
@@ -63,7 +63,7 @@ tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp     \
                $(top_srcdir)/ntpd/ntp_restrict.c       \
                $(top_srcdir)/ntpd/ntp_util.c   \
                $(top_srcdir)/ntpd/rc_cmdlength.c       \
-               $(top_srcdir)/ntpd/ntp_signd.c          \
+               t-ntp_signd.c           \
                g_leapsec.cpp   \
                $(NULL)
 
@@ -73,7 +73,7 @@ BUILT_SOURCES +=                      \
        $(srcdir)/run-ntp_restrict.c    \
        $(srcdir)/run-ntp_util.c        \
        $(srcdir)/run-rc_cmdlength.c            \
-       $(srcdir)/run-ntp_signdT.c              \
+       $(srcdir)/run-t-ntp_signd.c             \
        $(NULL)
 
 noinst_HEADERS =       g_ntpdtest.h            \
@@ -179,30 +179,30 @@ $(srcdir)/run-rc_cmdlength.c: $(srcdir)/rc_cmdlength.c $(std_unity_list)
        $(run_unity) rc_cmdlength.c run-rc_cmdlength.c
 
 ###
-test_ntp_signdT_CFLAGS =                       \
+test_ntp_signd_CFLAGS =                        \
        -I$(top_srcdir)/sntp/unity      \
-       -I$(top_srcdir)/ntpd            \
+       -Iwhy.h         \
        $(NULL)
 
-test_ntp_signdT_LDADD =                        \
+test_ntp_signd_LDADD =                 \
        $(unity_tests_LDADD)            \
        $(top_builddir)/ntpd/libntpd.a  \
-       $(top_builddir)/ntpd/ntp_signd.o        \
+       $(unity_tests_LDADD)            \
        $(top_builddir)/ntpd/ntp_config.o       \
        $(top_builddir)/ntpd/ntp_io.o   \
        $(NULL)
 
-#      $(top_builddir)/ntpd/ntp_signd.o
+#      $(top_builddir)/ntpd/ntp_signd.o #not needed if you #include the file.c
 
-test_ntp_signdT_SOURCES =                      \
-       ntp_signdT.c                    \
-       run-ntp_signdT.c                        \
-       $(top_builddir)/tests/libntp/test-libntp.c              \
-       $(top_builddir)/ntpd/ntp_signd.c                \
+test_ntp_signd_SOURCES =                       \
+       t-ntp_signd.c                   \
+       run-t-ntp_signd.c                       \
+       $(srcdir)/../libntp/test-libntp.c               \
+       $(srcdir)/../../ntpd/ntp_signd.c                \
        $(NULL)
 
-$(srcdir)/run-ntp_signdT.c: $(srcdir)/ntp_signdT.c $(std_unity_list)
-       $(run_unity) ntp_signdT.c run-ntp_signdT.c
+$(srcdir)/run-t-ntp_signd.c: $(srcdir)/t-ntp_signd.c $(std_unity_list)
+       $(run_unity) t-ntp_signd.c run-t-ntp_signd.c
 
 ###
 test_ntp_scanner_CFLAGS =                      \
diff --git a/tests/ntpd/run-ntp_signdT.c b/tests/ntpd/run-ntp_signdT.c
deleted file mode 100644 (file)
index f52065c..0000000
+++ /dev/null
@@ -1,58 +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>
-#include "config.h"
-#include "ntp.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-#include "test-libntp.h"
-
-//=======External Functions This Runner Calls=====
-extern void setUp(void);
-extern void tearDown(void);
-extern void test_ux_socket_connect(void);
-extern void test_write_all(void);
-
-
-//=======Test Reset Option=====
-void resetTest(void);
-void resetTest(void)
-{
-  tearDown();
-  setUp();
-}
-
-char *progname;
-
-
-//=======MAIN=====
-int main(int argc, char *argv[])
-{
-  progname = argv[0];
-  UnityBegin("ntp_signdT.c");
-  RUN_TEST(test_ux_socket_connect, 19);
-  RUN_TEST(test_write_all, 41);
-
-  return (UnityEnd());
-}