]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
bk: 55b53655eAuUTjtnqbYv6q3Q6nBg6g
authorDamir Tomic <viperus@ntp.org>
Sun, 26 Jul 2015 19:34:45 +0000 (21:34 +0200)
committerDamir Tomic <viperus@ntp.org>
Sun, 26 Jul 2015 19:34:45 +0000 (21:34 +0200)
tests/ntpd/Makefile.am
tests/ntpd/ntp_signd.c
tests/ntpd/run-ntp_signd.c

index 02fb60245822ed3662cf8edad77727891678e6fc..6c224f808fac5604aab89804c3ea371276d04752 100644 (file)
@@ -11,7 +11,7 @@ run_unity =   cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
 check_PROGRAMS =               \
        test-leapsec            \
        test-rc_cmdlength   \
-       test-ntp_signd      \
+       test-ntp_scanner        \
        $(NULL)
 
 if GTEST_AVAILABLE
@@ -111,6 +111,7 @@ test_ntp_signd_CFLAGS =                     \
        $(NULL)
 
 test_ntp_signd_LDADD =                 \
+       $(top_builddir)/ntpd/libntpd.a  \
        $(unity_tests_LDADD)            \
        $(NULL)
 
@@ -123,6 +124,24 @@ test_ntp_signd_SOURCES =                   \
 $(srcdir)/run-ntp_signd.c: $(srcdir)/ntp_signd.c $(std_unity_list)
        $(run_unity) ntp_signd.c run-ntp_signd.c
 
+###
+test_ntp_scanner_CFLAGS =                      \
+       -I$(top_srcdir)/sntp/unity      \
+       $(NULL)
+
+test_ntp_scanner_LDADD =                       \
+       $(unity_tests_LDADD)            \
+       $(NULL)
+
+test_ntp_scanner_SOURCES =                     \
+       ntp_scanner.c                   \
+       run-ntp_scanner.c                       \
+       $(srcdir)/../libntp/test-libntp.c               \
+       $(NULL)
+
+$(srcdir)/run-ntp_scanner.c: $(srcdir)/ntp_scanner.c $(std_unity_list)
+       $(run_unity) ntp_scanner.c run-ntp_scanner.c
+
 
 TESTS =
 
index 622ca93d87dc3beff31e8041ad1eaf271793099b..7a585dd34a2f41505b71bc4a9aa2030abbafaa94 100644 (file)
@@ -21,4 +21,6 @@ test_ux_socket_connect(void){
 }
 
 void
-test_write_all(void)
+test_write_all(void){
+
+}
index e840000841578487279594160fb19ff3b57526d1..e6e3cef41eadd66be4e39a1f748f7f570baaa4d5 100644 (file)
 #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);
-void resetTest(void);
 extern void test_ux_socket_connect(void);
+extern void test_write_all(void);
 
 
 //=======Test Reset Option=====
-void resetTest()
+void resetTest(void);
+void resetTest(void)
 {
   tearDown();
   setUp();
@@ -44,9 +50,9 @@ char *progname;
 int main(int argc, char *argv[])
 {
   progname = argv[0];
-  Unity.TestFile = "ntp_signd.c";
   UnityBegin("ntp_signd.c");
   RUN_TEST(test_ux_socket_connect, 13);
+  RUN_TEST(test_write_all, 24);
 
   return (UnityEnd());
 }