$(top_srcdir)/ntpd/ntp_prio_q.c \
$(top_srcdir)/ntpd/ntp_restrict.c \
$(top_srcdir)/ntpd/rc_cmdlength.c \
- $(top_srcdir)/ntpd/ntp_signd.c \
+ $(top_srcdir)/ntpd/ntp_signd.c \
g_leapsec.cpp \
$(NULL)
###
test_ntp_signdT_CFLAGS = \
-I$(top_srcdir)/sntp/unity \
+ -Iwhy.h \
$(NULL)
test_ntp_signdT_LDADD = \
$(unity_tests_LDADD) \
$(top_builddir)/ntpd/libntpd.a \
- $(top_builddir)/ntpd/ntp_signd.o \
$(unity_tests_LDADD) \
+ $(top_builddir)/ntpd/ntp_signd.o \
+ $(top_builddir)/ntpd/ntp_config.o \
+ $(top_builddir)/ntpd/ntp_io.o \
$(NULL)
+# $(top_builddir)/ntpd/ntp_signd.o
+
test_ntp_signdT_SOURCES = \
ntp_signdT.c \
run-ntp_signdT.c \
#include "test-libntp.h"
+#define HAVE_NTP_SIGND
+
#include "ntp_signd.c"
+//extern int ux_socket_connect(const char *name);
+
+
void
test_ux_socket_connect(void){
- TEST_ASSERT_EQUAL(-1, ux_socket_connect(NULL));
- TEST_ASSERT_EQUAL(-1, ux_socket_connect("127.0.0.1"));
+//send_via_ntp_signd(NULL,NULL,NULL,NULL,NULL);
+ /*
+ send_via_ntp_signd(
+ struct recvbuf *rbufp,
+ int xmode,
+ keyid_t xkeyid,
+ int flags,
+ struct pkt *xpkt)
+*/
+ TEST_ASSERT_EQUAL(-1, ux_socket_connect(NULL));
+ //TEST_ASSERT_EQUAL(-1, ux_socket_connect("127.0.0.1:123"));
+ TEST_ASSERT_EQUAL(-1, ux_socket_connect("/socket"));
//write_all()
char *socketName = "Random_Socket_Name";
{
progname = argv[0];
UnityBegin("ntp_signdT.c");
- RUN_TEST(test_ux_socket_connect, 14);
- RUN_TEST(test_write_all, 26);
+ RUN_TEST(test_ux_socket_connect, 19);
+ RUN_TEST(test_write_all, 41);
return (UnityEnd());
}