From: Damir Tomic Date: Fri, 7 Aug 2015 06:07:50 +0000 (+0200) Subject: Makefile.am: X-Git-Tag: NTP_4_3_72~2^2~20^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58dd5a0e1ff227923e4c2d10da01379971d768d6;p=thirdparty%2Fntp.git Makefile.am: re-added ntpq, works now run-t-ntpq.c: added Makefile.am: minor cleanup configure.ac: added ntpq dir bk: 55c44b36x6ZUmJurNSt6QuQEbxt_VA --- diff --git a/configure.ac b/configure.ac index de6043015..3cb57716d 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8e76218be..d11a1b38a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) diff --git a/tests/ntpq/Makefile.am b/tests/ntpq/Makefile.am index d724a44eb..8676cf91d 100644 --- a/tests/ntpq/Makefile.am +++ b/tests/ntpq/Makefile.am @@ -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 index 000000000..3c9416a9a --- /dev/null +++ b/tests/ntpq/run-t-ntpq.c @@ -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 +#include +#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()); +}