run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
check_PROGRAMS = \
+ test-ntp_signd \
test-leapsec \
test-rc_cmdlength \
- $(NULL)
-
-EXTRA_PROGRAMS = \
test-ntp_restrict \
test-ntp_scanner \
- test-ntp_signd \
test-ntp_prio_q \
$(NULL)
+EXTRA_PROGRAMS = \
+ $(NULL)
+
LDADD = \
$(top_builddir)/ntpd/libntpd.a \
$(top_builddir)/libntp/libntp.a \
$(srcdir)/run-ntp_prio_q.c \
$(srcdir)/run-ntp_restrict.c \
$(srcdir)/run-rc_cmdlength.c \
- $(srcdir)/run-ntp_signd.c \
+ $(srcdir)/run-t-ntp_signd.c \
$(NULL)
#noinst_HEADERS = \
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)
test_ntp_signd_SOURCES = \
- ntp_signd.c \
- run-ntp_signd.c \
+ t-ntp_signd.c \
+ run-t-ntp_signd.c \
$(srcdir)/../libntp/test-libntp.c \
+ $(srcdir)/../../ntpd/ntp_signd.c \
$(NULL)
-$(srcdir)/run-ntp_signd.c: $(srcdir)/ntp_signd.c $(std_unity_list)
- $(run_unity) ntp_signd.c run-ntp_signd.c
+$(srcdir)/run-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 = \
--- /dev/null
+/* 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"
+#include <time.h>
+#include <string.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_mprintf_clock_stats(void);
+extern void test_fstostr(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_util.c");
+ RUN_TEST(test_mprintf_clock_stats, 13);
+ RUN_TEST(test_fstostr, 27);
+
+ return (UnityEnd());
+}