diff options
author | Xin LI <delphij@FreeBSD.org> | 2018-02-28 06:23:12 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2018-02-28 06:23:12 +0000 |
commit | d14ac12f8738acac881f20b4d6244cfc22c68ead (patch) | |
tree | 8888cc3c4a7235bf8abd28681330d20442bc3705 /tests/bug-2803 | |
parent | 07ac48c3644021279e113d530764a231e27490a7 (diff) |
Notes
Diffstat (limited to 'tests/bug-2803')
-rw-r--r-- | tests/bug-2803/Makefile.am | 14 | ||||
-rw-r--r-- | tests/bug-2803/Makefile.in | 15 | ||||
-rw-r--r-- | tests/bug-2803/run-bug-2803.c | 10 | ||||
-rw-r--r-- | tests/bug-2803/testconf.yml | 9 |
4 files changed, 38 insertions, 10 deletions
diff --git a/tests/bug-2803/Makefile.am b/tests/bug-2803/Makefile.am index d679ac47be877..be88a5a30e9fd 100644 --- a/tests/bug-2803/Makefile.am +++ b/tests/bug-2803/Makefile.am @@ -3,14 +3,19 @@ NULL = BUILT_SOURCES = CLEANFILES = -std_unity_list = \ - $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ +std_unity_list = \ + $(abs_top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ + $(abs_srcdir)/testconf.yml \ $(NULL) -run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb +run_unity = ruby $(std_unity_list) check_PROGRAMS = bug-2803 +EXTRA_DIST = \ + testconf.yml \ + $(NULL) + # HMS: we may not need some of these: LDADD = \ $(top_builddir)/sntp/unity/libunity.a \ @@ -18,6 +23,7 @@ LDADD = \ $(LDADD_LIBNTP) \ $(PTHREAD_LIBS) \ $(LDADD_NTP) \ + $(LIBM) \ $(NULL) AM_CFLAGS = $(CFLAGS_NTP) @@ -41,7 +47,7 @@ bug_2803_SOURCES = \ $(NULL) $(srcdir)/run-bug-2803.c: $(srcdir)/bug-2803.c $(std_unity_list) - $(run_unity) bug-2803.c run-bug-2803.c + $(run_unity) $< $@ # HMS: we may not need some of these: #noinst_HEADERS = ntpdtest.h \ diff --git a/tests/bug-2803/Makefile.in b/tests/bug-2803/Makefile.in index 5c04ab2b630fe..2a50a9b0b03ea 100644 --- a/tests/bug-2803/Makefile.in +++ b/tests/bug-2803/Makefile.in @@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ $(top_srcdir)/sntp/m4/ltsugar.m4 \ $(top_srcdir)/sntp/m4/ltversion.m4 \ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \ + $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \ @@ -146,7 +147,7 @@ am__DEPENDENCIES_1 = bug_2803_DEPENDENCIES = $(top_builddir)/sntp/unity/libunity.a \ $(top_builddir)/libntp/libntp.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -693,10 +694,15 @@ NULL = BUILT_SOURCES = check-libntp check-libunity .deps-ver CLEANFILES = check-libntp check-libunity .deps-ver std_unity_list = \ - $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ + $(abs_top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ + $(abs_srcdir)/testconf.yml \ + $(NULL) + +run_unity = ruby $(std_unity_list) +EXTRA_DIST = \ + testconf.yml \ $(NULL) -run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb # HMS: we may not need some of these: LDADD = \ @@ -705,6 +711,7 @@ LDADD = \ $(LDADD_LIBNTP) \ $(PTHREAD_LIBS) \ $(LDADD_NTP) \ + $(LIBM) \ $(NULL) AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS) @@ -1192,7 +1199,7 @@ uninstall-am: $(srcdir)/run-bug-2803.c: $(srcdir)/bug-2803.c $(std_unity_list) - $(run_unity) bug-2803.c run-bug-2803.c + $(run_unity) $< $@ check-libntp: ../../libntp/libntp.a @echo stamp > $@ diff --git a/tests/bug-2803/run-bug-2803.c b/tests/bug-2803/run-bug-2803.c index f4066f25f826e..b25e362538a7e 100644 --- a/tests/bug-2803/run-bug-2803.c +++ b/tests/bug-2803/run-bug-2803.c @@ -32,9 +32,15 @@ extern void setUp(void); extern void tearDown(void); extern void test_main(void); -extern void test_main(void ); +//=======Suite Setup===== +static void suite_setup(void) +{ +extern int change_logfile(const char*, int); +change_logfile("stderr", 0); +} + //=======Test Reset Option===== void resetTest(void); void resetTest(void) @@ -50,9 +56,9 @@ char const *progname; int main(int argc, char *argv[]) { progname = argv[0]; + suite_setup(); UnityBegin("bug-2803.c"); RUN_TEST(test_main, 18); - RUN_TEST(test_main, 18); return (UnityEnd()); } diff --git a/tests/bug-2803/testconf.yml b/tests/bug-2803/testconf.yml new file mode 100644 index 0000000000000..6140daaf9c787 --- /dev/null +++ b/tests/bug-2803/testconf.yml @@ -0,0 +1,9 @@ +# configure the test runner generator to properly set up the tests +# - avoid cluttering the syslogs + +--- +:unity: + :suite_setup: + - extern int change_logfile(const char*, int); + - change_logfile("stderr", 0); + |