]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Makefile.am:
authorDamir Tomic <viperus@ntp.org>
Fri, 7 Aug 2015 06:07:50 +0000 (08:07 +0200)
committerDamir Tomic <viperus@ntp.org>
Fri, 7 Aug 2015 06:07:50 +0000 (08:07 +0200)
  re-added ntpq,  works now
run-t-ntpq.c:
  added
Makefile.am:
  minor cleanup
configure.ac:
  added ntpq dir

bk: 55c44b36x6ZUmJurNSt6QuQEbxt_VA

configure.ac
tests/Makefile.am
tests/ntpq/Makefile.am
tests/ntpq/run-t-ntpq.c [new file with mode: 0644]

index de6043015b174174dd23d63fd8ceef68053dde1e..3cb57716d7328bd5974319661b73d2e31e301921 100644 (file)
@@ -4425,6 +4425,7 @@ AC_CONFIG_FILES([tests/Makefile])
 AC_CONFIG_FILES([tests/bug-2803/Makefile])
 AC_CONFIG_FILES([tests/libntp/Makefile])
 AC_CONFIG_FILES([tests/ntpd/Makefile])
+AC_CONFIG_FILES([tests/ntpq/Makefile])
 AC_CONFIG_FILES([tests/sandbox/Makefile])
 AC_CONFIG_FILES([tests/sec-2853/Makefile])
 AC_CONFIG_FILES([util/Makefile])
index 8e76218be1ed85ba2a616ab235418358214e87b9..d11a1b38a71361e4e0ed2b2fc94c372cfefbd4fe 100644 (file)
@@ -13,6 +13,7 @@ SUBDIRS +=            \
        libntp          \
        sec-2853        \
        ntpd            \
+       ntpq            \
        $(NULL)
 
 DIST_SUBDIRS +=                \
@@ -21,5 +22,6 @@ DIST_SUBDIRS +=               \
        ntpd            \
        sandbox         \
        sec-2853        \
+       ntpq            \
        $(NULL)
 
index d724a44eb3da9485fe6addfb80ab9dd8f2a5808d..8676cf91d4f7e587ab33429b2166e7609cbe5373 100644 (file)
@@ -32,7 +32,6 @@ AM_CFLAGS   = $(CFLAGS_NTP)
 AM_CXXFLAGS = $(GTEST_CXXFLAGS)
 
 
-
 AM_CPPFLAGS  = $(NTP_INCS)
 AM_CPPFLAGS += -I$(top_srcdir)/ntpq
 #AM_CPPFLAGS += -I$(top_srcdir)/sntp
diff --git a/tests/ntpq/run-t-ntpq.c b/tests/ntpq/run-t-ntpq.c
new file mode 100644 (file)
index 0000000..3c9416a
--- /dev/null
@@ -0,0 +1,55 @@
+/* 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_stdlib.h"
+#include "ntpq.h"
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void testPrimary(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("t-ntpq.c");
+  RUN_TEST(testPrimary, 9);
+
+  return (UnityEnd());
+}