From: Damir Tomic Date: Sun, 26 Jul 2015 19:34:45 +0000 (+0200) Subject: bk: 55b53655eAuUTjtnqbYv6q3Q6nBg6g X-Git-Tag: NTP_4_3_67~2^2~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4d7388dcea564d3306913b69ae857e59f0722b6;p=thirdparty%2Fntp.git bk: 55b53655eAuUTjtnqbYv6q3Q6nBg6g --- diff --git a/tests/ntpd/Makefile.am b/tests/ntpd/Makefile.am index 02fb60245..6c224f808 100644 --- a/tests/ntpd/Makefile.am +++ b/tests/ntpd/Makefile.am @@ -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 = diff --git a/tests/ntpd/ntp_signd.c b/tests/ntpd/ntp_signd.c index 622ca93d8..7a585dd34 100644 --- a/tests/ntpd/ntp_signd.c +++ b/tests/ntpd/ntp_signd.c @@ -21,4 +21,6 @@ test_ux_socket_connect(void){ } void -test_write_all(void) +test_write_all(void){ + +} diff --git a/tests/ntpd/run-ntp_signd.c b/tests/ntpd/run-ntp_signd.c index e84000084..e6e3cef41 100644 --- a/tests/ntpd/run-ntp_signd.c +++ b/tests/ntpd/run-ntp_signd.c @@ -22,16 +22,22 @@ #include "unity.h" #include #include +#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()); }