From: Harlan Stenn Date: Wed, 17 Jun 2015 08:05:10 +0000 (-0400) Subject: clean up unity test names X-Git-Tag: NTP_4_3_42~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=507e48fd115bcd1249312eb6b955b80ee8bae185;p=thirdparty%2Fntp.git clean up unity test names bk: 55812a36aCJ1mT2YtfrmWVjZATa2zA --- diff --git a/bootstrap b/bootstrap index 2808b24e4..dcba5c7fa 100755 --- a/bootstrap +++ b/bootstrap @@ -71,13 +71,13 @@ AUTORECONF=${AUTORECONF:-autoreconf} # the ruby generator must be older than the test files. # the test files must be older than the runner files. -runner_files=`find [B-Za-z]* -type f -name 'run-test-*' -print | fgrep -v /SCCS/` +runner_files=`find [B-Za-z]* -type f -name 'run-*' -print | fgrep -v /SCCS/` l= lt= lr= for f in ${runner_files} do - fb=`echo $f | sed -e 's/run-test-//'` + fb=`echo $f | sed -e 's/run-//'` lt="$lt $fb" lr="$lr $f" # Yes, lr and runner_files are eventually the same done diff --git a/tests/bug-2803/Makefile- b/tests/bug-2803/Makefile- deleted file mode 100644 index cf29dc65e..000000000 --- a/tests/bug-2803/Makefile- +++ /dev/null @@ -1,10 +0,0 @@ -TARGET = test-2803 - -OBJS = $(TARGET).o - -CFLAGS += -Wall - -all: $(TARGET) - -clean: - rm -f *.o $(TARGET) diff --git a/tests/bug-2803/Makefile.am b/tests/bug-2803/Makefile.am index db089e8b4..dca6e4b51 100644 --- a/tests/bug-2803/Makefile.am +++ b/tests/bug-2803/Makefile.am @@ -31,12 +31,12 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP) AM_LDFLAGS = $(LDFLAGS_NTP) bug_2803_SOURCES = \ + bug-2803.c \ run-bug-2803.c \ - ut-2803.c \ $(NULL) -$(srcdir)/run-bug-2803.c: $(srcdir)/ut-2803.c $(std_unity_list) - $(run_unity) ut-2803.c run-bug-2803.c +$(srcdir)/run-bug-2803.c: $(srcdir)/bug-2803.c $(std_unity_list) + $(run_unity) bug-2803.c run-bug-2803.c # HMS: we may not need some of these: #noinst_HEADERS = ntpdtest.h \ diff --git a/tests/bug-2803/ut-2803.c b/tests/bug-2803/bug-2803.c similarity index 100% rename from tests/bug-2803/ut-2803.c rename to tests/bug-2803/bug-2803.c diff --git a/tests/bug-2803/test-2803.c b/tests/bug-2803/test-2803.c deleted file mode 100644 index b474bd992..000000000 --- a/tests/bug-2803/test-2803.c +++ /dev/null @@ -1,229 +0,0 @@ - -#include -#include - -/* microseconds per second */ -#define MICROSECONDS 1000000 - - -static int verbose = 1; // if not 0, also print results if test passed -static int exit_on_err = 0; // if not 0, exit if test failed - - -/* - * Inline functions below copied from NTP 4.source code, - -/* make sure microseconds are in nominal range */ -static inline struct timeval -normalize_tval( - struct timeval x - ) -{ - long z; - - /* - * If the fraction becomes excessive denormal, we use division - * to do first partial normalisation. The normalisation loops - * following will do the remaining cleanup. Since the size of - * tv_usec has a peculiar definition by the standard the range - * check is coded manually. And labs() is intentionally not used - * here: it has implementation-defined behaviour when applied - * to LONG_MIN. - */ - if (x.tv_usec < -3l * MICROSECONDS || - x.tv_usec > 3l * MICROSECONDS ) { - z = x.tv_usec / MICROSECONDS; - x.tv_usec -= z * MICROSECONDS; - x.tv_sec += z; - } - - /* - * Do any remaining normalisation steps in loops. This takes 3 - * steps max, and should outperform a division even if the - * mul-by-inverse trick is employed. (It also does the floor - * division adjustment if the above division was executed.) - */ - if (x.tv_usec < 0) - do { - x.tv_usec += MICROSECONDS; - x.tv_sec--; - } while (x.tv_usec < 0); - else if (x.tv_usec >= MICROSECONDS) - do { - x.tv_usec -= MICROSECONDS; - x.tv_sec++; - } while (x.tv_usec >= MICROSECONDS); - - return x; -} - - - -/* x = a + b */ -static inline struct timeval -add_tval( - struct timeval a, - struct timeval b - ) -{ - struct timeval x; - - x = a; - x.tv_sec += b.tv_sec; - x.tv_usec += b.tv_usec; - - return normalize_tval(x); -} - -/* x = a + b, b is fraction only */ -static inline struct timeval -add_tval_us( - struct timeval a, - long b - ) -{ - struct timeval x; - - x = a; - x.tv_usec += b; - - return normalize_tval(x); -} - -/* x = a - b */ -static inline struct timeval -sub_tval( - struct timeval a, - struct timeval b - ) -{ - struct timeval x; - - x = a; - x.tv_sec -= b.tv_sec; - x.tv_usec -= b.tv_usec; - - return normalize_tval(x); -} - -/* x = a - b, b is fraction only */ -static inline struct timeval -sub_tval_us( - struct timeval a, - long b - ) -{ - struct timeval x; - - x = a; - x.tv_usec -= b; - - return normalize_tval(x); -} - -/* x = abs(a) */ -static inline struct timeval -abs_tval( - struct timeval a - ) -{ - struct timeval c; - - c = normalize_tval(a); - if (c.tv_sec < 0) { - if (c.tv_usec != 0) { - c.tv_sec = -c.tv_sec - 1; - c.tv_usec = MICROSECONDS - c.tv_usec; - } else { - c.tv_sec = -c.tv_sec; - } - } - - return c; -} - - - -/* - * Test function calling the old and new code mentioned in - * http://bugs.ntp.org/show_bug.cgi?id=2803#c22 - */ -static -int do_test( struct timeval timetv, struct timeval tvlast ) -{ - struct timeval tvdiff_old; - struct timeval tvdiff_new; - - int cond_old; - int cond_new; - int failed; - - cond_old = 0; - cond_new = 0; - - // Here is the old code: - tvdiff_old = abs_tval(sub_tval(timetv, tvlast)); - if (tvdiff_old.tv_sec > 0) { - cond_old = 1; - } - - // Here is the new code: - tvdiff_new = sub_tval(timetv, tvlast); - if (tvdiff_new.tv_sec != 0) { - cond_new = 1; - } - - failed = cond_new != cond_old; - - if ( failed || verbose ) - printf( "timetv %lli|%07li, tvlast %lli|%07li: tvdiff_old: %lli|%07li -> %i, tvdiff_new: %lli|%07li -> %i, same cond: %s\n", - (long long) timetv.tv_sec, timetv.tv_usec, - (long long) tvlast.tv_sec, tvlast.tv_usec, - (long long) tvdiff_old.tv_sec, tvdiff_old.tv_usec, cond_old, - (long long) tvdiff_new.tv_sec, tvdiff_new.tv_usec, cond_new, - failed ? "NO <<" : "yes" ); - - return failed ? -1 : 0; -} - - - -/* - * Call the test function in a loop for a given set of parameters. - * Both timetv and tvlast iterate over the given range, in all combinations. - */ -static -int test_loop( long long start_sec, long start_usec, - long long stop_sec, long stop_usec, - long long step_sec, long step_usec ) -{ - struct timeval timetv; - struct timeval tvlast; - - for ( timetv.tv_sec = start_sec; timetv.tv_sec <= stop_sec; timetv.tv_sec += step_sec ) - for ( timetv.tv_usec = start_usec; timetv.tv_usec <= stop_usec; timetv.tv_usec += step_usec ) - for ( tvlast.tv_sec = start_sec; tvlast.tv_sec <= stop_sec; tvlast.tv_sec += step_sec ) - for ( tvlast.tv_usec = start_usec; tvlast.tv_usec <= stop_usec; tvlast.tv_usec += step_usec ) - { - int rc = do_test( timetv, tvlast ); - if (rc < 0 && exit_on_err ) - return rc; - } - - return 0; -} - - - -int main( void ) -{ - - // loop from {0.0} to {1.1000000} stepping by tv_sec by 1 and tv_usec by 100000 - test_loop( 0, 0, 1, MICROSECONDS, 1, MICROSECONDS / 10 ); - - // test_loop( 0, 0, 5, MICROSECONDS, 1, MICROSECONDS / 1000 ); - // test_loop( 0, 0, -5, -MICROSECONDS, -1, -MICROSECONDS / 1000 ); - - return 0; -} - diff --git a/tests/libntp/Makefile.am b/tests/libntp/Makefile.am index 04830dd33..ba89cc9ae 100644 --- a/tests/libntp/Makefile.am +++ b/tests/libntp/Makefile.am @@ -6,31 +6,31 @@ run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb #removed test-libntp check_PROGRAMS = \ - test-modetoa \ - test-uglydate \ - test-ymd2yd \ - test-statestr \ - test-numtoa \ - test-numtohost \ - test-hextoint \ + test-a_md5encrypt \ test-atoint \ test-atouint \ test-authkeys \ - test-a_md5encrypt \ - test-lfpfunc \ - test-vi64ops \ - test-refnumtoa \ + test-calendar \ + test-caljulian \ test-calyearstart \ test-clocktime \ - test-caljulian \ - test-calendar \ - test-octtoint \ + test-decodenetnum \ + test-hextoint \ test-hextolfp \ + test-lfpfunc \ + test-modetoa \ test-netof \ + test-numtoa \ + test-numtohost \ + test-octtoint \ + test-refnumtoa \ test-socktoa \ - test-decodenetnum \ - test-timevalops \ + test-statestr \ test-timespecops \ + test-timevalops \ + test-uglydate \ + test-vi64ops \ + test-ymd2yd \ $(NULL) if GTEST_AVAILABLE @@ -69,47 +69,75 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP) AM_LDFLAGS = $(LDFLAGS_NTP) tests_SOURCES = \ - $(top_srcdir)/sntp/tests_main.cpp \ - libntptest.cpp \ - g_a_md5encrypt.cpp \ - g_atoint.cpp \ - g_atouint.cpp \ - g_authkeys.cpp \ - buftvtots.cpp \ - g_calendar.cpp \ - g_caljulian.cpp \ - caltontp.cpp \ - g_calyearstart.cpp \ - g_clocktime.cpp \ - g_decodenetnum.cpp \ - g_hextoint.cpp \ - g_hextolfp.cpp \ - humandate.cpp \ - g_lfpfunc.cpp \ - lfptostr.cpp \ - g_modetoa.cpp \ - msyslog.cpp \ - g_netof.cpp \ - g_numtoa.cpp \ - g_numtohost.cpp \ - g_octtoint.cpp \ - prettydate.cpp \ - recvbuff.cpp \ - g_refnumtoa.cpp \ - sfptostr.cpp \ - socktoa.cpp \ - ssl_init.cpp \ - g_statestr.cpp \ - strtolfp.cpp \ - g_timespecops.cpp \ - timestructs.cpp \ - g_timevalops.cpp \ - tstotv.cpp \ - tvtots.cpp \ - g_uglydate.cpp \ - g_vi64ops.cpp \ - g_ymd2yd.cpp \ - $(NULL) + $(top_srcdir)/sntp/tests_main.cpp \ + libntptest.cpp \ + g_a_md5encrypt.cpp \ + g_atoint.cpp \ + g_atouint.cpp \ + g_authkeys.cpp \ + buftvtots.cpp \ + g_calendar.cpp \ + g_caljulian.cpp \ + caltontp.cpp \ + g_calyearstart.cpp \ + g_clocktime.cpp \ + g_decodenetnum.cpp \ + g_hextoint.cpp \ + g_hextolfp.cpp \ + humandate.cpp \ + g_lfpfunc.cpp \ + lfptostr.cpp \ + g_modetoa.cpp \ + msyslog.cpp \ + g_netof.cpp \ + g_numtoa.cpp \ + g_numtohost.cpp \ + g_octtoint.cpp \ + prettydate.cpp \ + recvbuff.cpp \ + g_refnumtoa.cpp \ + sfptostr.cpp \ + socktoa.cpp \ + ssl_init.cpp \ + g_statestr.cpp \ + strtolfp.cpp \ + g_timespecops.cpp \ + timestructs.cpp \ + g_timevalops.cpp \ + tstotv.cpp \ + tvtots.cpp \ + g_uglydate.cpp \ + g_vi64ops.cpp \ + g_ymd2yd.cpp \ + $(NULL) + +BUILT_SOURCES += \ + $(srcdir)/run-a_md5encrypt.c \ + $(srcdir)/run-atoint.c \ + $(srcdir)/run-atouint.c \ + $(srcdir)/run-authkeys.c \ + $(srcdir)/run-caljulian.c \ + $(srcdir)/run-calyearstart.c \ + $(srcdir)/run-clocktime.c \ + $(srcdir)/run-decodenetnum.c \ + $(srcdir)/run-hextoint.c \ + $(srcdir)/run-hextolfp.c \ + $(srcdir)/run-lfpfunc.c \ + $(srcdir)/run-modetoa.c \ + $(srcdir)/run-netof.c \ + $(srcdir)/run-numtoa.c \ + $(srcdir)/run-numtohost.c \ + $(srcdir)/run-octtoint.c \ + $(srcdir)/run-refnumtoa.c \ + $(srcdir)/run-socktoa.c \ + $(srcdir)/run-statestr.c \ + $(srcdir)/run-uglydate.c \ + $(srcdir)/run-vi64ops.c \ + $(srcdir)/run-ymd2yd.c \ + $(srcdir)/run-calendar.c \ + $(srcdir)/run-timevalops.c \ + $(srcdir)/run-timespecops.c \ + $(NULL) noinst_HEADERS = \ lfptest.h \ @@ -121,8 +149,8 @@ noinst_HEADERS = \ test-libntp.h \ $(NULL) -#$(srcdir)/run-test-libntp.c: $(srcdir)/test-libntp.c $(std_unity_list) -# $(run_unity) test-libntp.c run-test-libntp.c +#$(srcdir)/run-libntp.c: $(srcdir)/test-libntp.c $(std_unity_list) +# $(run_unity) test-libntp.c run-libntp.c #test_libntp_CFLAGS = \ # -I$(top_srcdir)/sntp/unity \ @@ -137,7 +165,7 @@ test_modetoa_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ $(NULL) -test_modetoa_LDADD = \ +test_modetoa_LDADD = \ $(LDADD) \ $(top_builddir)/sntp/unity/libunity.a \ $(NULL) @@ -190,7 +218,7 @@ test_hextoint_CFLAGS = \ $(NULL) test_hextoint_LDADD = \ - $(unity_tests_LDADD) + $(unity_tests_LDADD) \ $(NULL) test_atoint_CFLAGS = \ @@ -198,7 +226,7 @@ test_atoint_CFLAGS = \ $(NULL) test_atoint_LDADD = \ - $(unity_tests_LDADD) + $(unity_tests_LDADD) \ $(NULL) test_octtoint_CFLAGS = \ @@ -255,7 +283,7 @@ test_atouint_CFLAGS = \ $(NULL) test_atouint_LDADD = \ - $(unity_tests_LDADD) + $(unity_tests_LDADD) \ $(NULL) test_authkeys_CFLAGS = \ @@ -339,10 +367,10 @@ test_timevalops_LDADD = \ $(NULL) test_timespecops_CFLAGS = \ - -I$(top_srcdir)/sntp/unity \ + -I$(top_srcdir)/sntp/unity \ $(NULL) -test_timespecops_LDADD = \ +test_timespecops_LDADD = \ $(LDADD) \ $(top_builddir)/sntp/unity/libunity.a \ $(NULL) @@ -350,235 +378,207 @@ test_timespecops_LDADD = \ test_modetoa_SOURCES = \ modetoa.c \ - run-test-modetoa.c \ + run-modetoa.c \ $(NULL) test_uglydate_SOURCES = \ uglydate.c \ - run-test-uglydate.c \ + run-uglydate.c \ $(NULL) test_ymd2yd_SOURCES = \ ymd2yd.c \ - run-test-ymd2yd.c \ + run-ymd2yd.c \ $(NULL) test_statestr_SOURCES = \ statestr.c \ - run-test-statestr.c \ + run-statestr.c \ $(NULL) test_numtoa_SOURCES = \ numtoa.c \ - run-test-numtoa.c \ + run-numtoa.c \ $(NULL) test_numtohost_SOURCES = \ numtohost.c \ - run-test-numtohost.c \ + run-numtohost.c \ $(NULL) test_hextoint_SOURCES = \ hextoint.c \ - run-test-hextoint.c \ + run-hextoint.c \ $(NULL) test_atoint_SOURCES = \ atoint.c \ - run-test-atoint.c \ + run-atoint.c \ $(NULL) test_a_md5encrypt_SOURCES = \ a_md5encrypt.c \ - run-test-a_md5encrypt.c \ + run-a_md5encrypt.c \ $(NULL) test_octtoint_SOURCES = \ octtoint.c \ - run-test-octtoint.c \ + run-octtoint.c \ $(NULL) test_hextolfp_SOURCES = \ hextolfp.c \ - run-test-hextolfp.c \ + run-hextolfp.c \ $(NULL) test_netof_SOURCES = \ netof.c \ - run-test-netof.c \ + run-netof.c \ $(NULL) test_decodenetnum_SOURCES = \ decodenetnum.c \ - run-test-decodenetnum.c \ + run-decodenetnum.c \ $(NULL) test_socktoa_SOURCES = \ socktoa.c \ - run-test-socktoa.c \ + run-socktoa.c \ $(NULL) test_atouint_SOURCES = \ atouint.c \ - run-test-atouint.c \ + run-atouint.c \ $(NULL) test_authkeys_SOURCES = \ authkeys.c \ - run-test-authkeys.c \ + run-authkeys.c \ $(NULL) test_lfpfunc_SOURCES = \ lfpfunc.c \ - run-test-lfpfunc.c \ + run-lfpfunc.c \ $(NULL) test_vi64ops_SOURCES = \ vi64ops.c \ - run-test-vi64ops.c \ + run-vi64ops.c \ $(NULL) test_refnumtoa_SOURCES = \ refnumtoa.c \ - run-test-refnumtoa.c \ + run-refnumtoa.c \ $(NULL) test_calyearstart_SOURCES = \ calyearstart.c \ - run-test-calyearstart.c \ + run-calyearstart.c \ test-libntp.c \ $(NULL) test_clocktime_SOURCES = \ clocktime.c \ - run-test-clocktime.c \ + run-clocktime.c \ test-libntp.c \ $(NULL) test_caljulian_SOURCES = \ caljulian.c \ - run-test-caljulian.c \ + run-caljulian.c \ test-libntp.c \ $(NULL) test_calendar_SOURCES = \ calendar.c \ - run-test-calendar.c \ + run-calendar.c \ test-libntp.c \ $(NULL) -test_timevalops_SOURCES = \ +test_timevalops_SOURCES = \ timevalops.c \ - run-test-timevalops.c \ + run-timevalops.c \ $(NULL) -test_timespecops_SOURCES = \ +test_timespecops_SOURCES = \ timespecops.c \ - run-test-timespecops.c \ - $(NULL) - -BUILT_SOURCES += \ - $(srcdir)/run-test-a_md5encrypt.c \ - $(srcdir)/run-test-atoint.c \ - $(srcdir)/run-test-atouint.c \ - $(srcdir)/run-test-authkeys.c \ - $(srcdir)/run-test-caljulian.c \ - $(srcdir)/run-test-calyearstart.c \ - $(srcdir)/run-test-clocktime.c \ - $(srcdir)/run-test-decodenetnum.c \ - $(srcdir)/run-test-hextoint.c \ - $(srcdir)/run-test-hextolfp.c \ - $(srcdir)/run-test-lfpfunc.c \ - $(srcdir)/run-test-modetoa.c \ - $(srcdir)/run-test-netof.c \ - $(srcdir)/run-test-numtoa.c \ - $(srcdir)/run-test-numtohost.c \ - $(srcdir)/run-test-octtoint.c \ - $(srcdir)/run-test-refnumtoa.c \ - $(srcdir)/run-test-socktoa.c \ - $(srcdir)/run-test-statestr.c \ - $(srcdir)/run-test-uglydate.c \ - $(srcdir)/run-test-vi64ops.c \ - $(srcdir)/run-test-ymd2yd.c \ - $(srcdir)/run-test-calendar.c \ - $(srcdir)/run-test-timevalops.c \ - $(srcdir)/run-test-timespecops.c \ + run-timespecops.c \ $(NULL) -$(srcdir)/run-test-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list) - $(run_unity) modetoa.c run-test-modetoa.c +$(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list) + $(run_unity) modetoa.c run-modetoa.c -$(srcdir)/run-test-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list) - $(run_unity) uglydate.c run-test-uglydate.c +$(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list) + $(run_unity) uglydate.c run-uglydate.c -$(srcdir)/run-test-ymd2yd.c: $(srcdir)/ymd2yd.c $(std_unity_list) - $(run_unity) ymd2yd.c run-test-ymd2yd.c +$(srcdir)/run-ymd2yd.c: $(srcdir)/ymd2yd.c $(std_unity_list) + $(run_unity) ymd2yd.c run-ymd2yd.c -$(srcdir)/run-test-statestr.c: $(srcdir)/statestr.c $(std_unity_list) - $(run_unity) statestr.c run-test-statestr.c +$(srcdir)/run-statestr.c: $(srcdir)/statestr.c $(std_unity_list) + $(run_unity) statestr.c run-statestr.c -$(srcdir)/run-test-numtoa.c: $(srcdir)/numtoa.c $(std_unity_list) - $(run_unity) numtoa.c run-test-numtoa.c +$(srcdir)/run-numtoa.c: $(srcdir)/numtoa.c $(std_unity_list) + $(run_unity) numtoa.c run-numtoa.c -$(srcdir)/run-test-numtohost.c: $(srcdir)/numtohost.c $(std_unity_list) - $(run_unity) numtohost.c run-test-numtohost.c +$(srcdir)/run-numtohost.c: $(srcdir)/numtohost.c $(std_unity_list) + $(run_unity) numtohost.c run-numtohost.c -$(srcdir)/run-test-hextoint.c: $(srcdir)/hextoint.c $(std_unity_list) - $(run_unity) hextoint.c run-test-hextoint.c +$(srcdir)/run-hextoint.c: $(srcdir)/hextoint.c $(std_unity_list) + $(run_unity) hextoint.c run-hextoint.c -$(srcdir)/run-test-atoint.c: $(srcdir)/atoint.c $(std_unity_list) - $(run_unity) atoint.c run-test-atoint.c +$(srcdir)/run-atoint.c: $(srcdir)/atoint.c $(std_unity_list) + $(run_unity) atoint.c run-atoint.c -$(srcdir)/run-test-octtoint.c: $(srcdir)/octtoint.c $(std_unity_list) - $(run_unity) octtoint.c run-test-octtoint.c +$(srcdir)/run-octtoint.c: $(srcdir)/octtoint.c $(std_unity_list) + $(run_unity) octtoint.c run-octtoint.c -$(srcdir)/run-test-hextolfp.c: $(srcdir)/hextolfp.c $(std_unity_list) - $(run_unity) hextolfp.c run-test-hextolfp.c +$(srcdir)/run-hextolfp.c: $(srcdir)/hextolfp.c $(std_unity_list) + $(run_unity) hextolfp.c run-hextolfp.c -$(srcdir)/run-test-netof.c: $(srcdir)/netof.c $(std_unity_list) - $(run_unity) netof.c run-test-netof.c +$(srcdir)/run-netof.c: $(srcdir)/netof.c $(std_unity_list) + $(run_unity) netof.c run-netof.c -$(srcdir)/run-test-decodenetnum.c: $(srcdir)/decodenetnum.c $(std_unity_list) - $(run_unity) decodenetnum.c run-test-decodenetnum.c +$(srcdir)/run-decodenetnum.c: $(srcdir)/decodenetnum.c $(std_unity_list) + $(run_unity) decodenetnum.c run-decodenetnum.c -$(srcdir)/run-test-socktoa.c: $(srcdir)/socktoa.c $(std_unity_list) - $(run_unity) socktoa.c run-test-socktoa.c +$(srcdir)/run-socktoa.c: $(srcdir)/socktoa.c $(std_unity_list) + $(run_unity) socktoa.c run-socktoa.c -$(srcdir)/run-test-a_md5encrypt.c: $(srcdir)/a_md5encrypt.c $(std_unity_list) - $(run_unity) a_md5encrypt.c run-test-a_md5encrypt.c +$(srcdir)/run-a_md5encrypt.c: $(srcdir)/a_md5encrypt.c $(std_unity_list) + $(run_unity) a_md5encrypt.c run-a_md5encrypt.c -$(srcdir)/run-test-atouint.c: $(srcdir)/atouint.c $(std_unity_list) - $(run_unity) atouint.c run-test-atouint.c +$(srcdir)/run-atouint.c: $(srcdir)/atouint.c $(std_unity_list) + $(run_unity) atouint.c run-atouint.c -$(srcdir)/run-test-authkeys.c: $(srcdir)/authkeys.c $(std_unity_list) - $(run_unity) authkeys.c run-test-authkeys.c +$(srcdir)/run-authkeys.c: $(srcdir)/authkeys.c $(std_unity_list) + $(run_unity) authkeys.c run-authkeys.c -$(srcdir)/run-test-lfpfunc.c: $(srcdir)/lfpfunc.c $(std_unity_list) - $(run_unity) lfpfunc.c run-test-lfpfunc.c +$(srcdir)/run-lfpfunc.c: $(srcdir)/lfpfunc.c $(std_unity_list) + $(run_unity) lfpfunc.c run-lfpfunc.c -$(srcdir)/run-test-vi64ops.c: $(srcdir)/vi64ops.c $(std_unity_list) - $(run_unity) vi64ops.c run-test-vi64ops.c +$(srcdir)/run-vi64ops.c: $(srcdir)/vi64ops.c $(std_unity_list) + $(run_unity) vi64ops.c run-vi64ops.c -$(srcdir)/run-test-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list) - $(run_unity) refnumtoa.c run-test-refnumtoa.c +$(srcdir)/run-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list) + $(run_unity) refnumtoa.c run-refnumtoa.c -$(srcdir)/run-test-calyearstart.c: $(srcdir)/calyearstart.c $(std_unity_list) - $(run_unity) calyearstart.c run-test-calyearstart.c +$(srcdir)/run-calyearstart.c: $(srcdir)/calyearstart.c $(std_unity_list) + $(run_unity) calyearstart.c run-calyearstart.c -$(srcdir)/run-test-clocktime.c: $(srcdir)/clocktime.c $(std_unity_list) - $(run_unity) clocktime.c run-test-clocktime.c +$(srcdir)/run-clocktime.c: $(srcdir)/clocktime.c $(std_unity_list) + $(run_unity) clocktime.c run-clocktime.c -$(srcdir)/run-test-caljulian.c: $(srcdir)/caljulian.c $(std_unity_list) - $(run_unity) caljulian.c run-test-caljulian.c +$(srcdir)/run-caljulian.c: $(srcdir)/caljulian.c $(std_unity_list) + $(run_unity) caljulian.c run-caljulian.c -$(srcdir)/run-test-calendar.c: $(srcdir)/calendar.c $(std_unity_list) - $(run_unity) calendar.c run-test-calendar.c +$(srcdir)/run-calendar.c: $(srcdir)/calendar.c $(std_unity_list) + $(run_unity) calendar.c run-calendar.c -$(srcdir)/run-test-timevalops.c: $(srcdir)/timevalops.c $(std_unity_list) - $(run_unity) timevalops.c run-test-timevalops.c +$(srcdir)/run-timevalops.c: $(srcdir)/timevalops.c $(std_unity_list) + $(run_unity) timevalops.c run-timevalops.c -$(srcdir)/run-test-timespecops.c: $(srcdir)/timespecops.c $(std_unity_list) - $(run_unity) timespecops.c run-test-timespecops.c +$(srcdir)/run-timespecops.c: $(srcdir)/timespecops.c $(std_unity_list) + $(run_unity) timespecops.c run-timespecops.c TESTS = diff --git a/tests/libntp/run-test-a_md5encrypt.c b/tests/libntp/run-a_md5encrypt.c similarity index 100% rename from tests/libntp/run-test-a_md5encrypt.c rename to tests/libntp/run-a_md5encrypt.c diff --git a/tests/libntp/run-test-atoint.c b/tests/libntp/run-atoint.c similarity index 100% rename from tests/libntp/run-test-atoint.c rename to tests/libntp/run-atoint.c diff --git a/tests/libntp/run-test-atouint.c b/tests/libntp/run-atouint.c similarity index 100% rename from tests/libntp/run-test-atouint.c rename to tests/libntp/run-atouint.c diff --git a/tests/libntp/run-test-authkeys.c b/tests/libntp/run-authkeys.c similarity index 100% rename from tests/libntp/run-test-authkeys.c rename to tests/libntp/run-authkeys.c diff --git a/tests/libntp/run-test-calendar.c b/tests/libntp/run-calendar.c similarity index 100% rename from tests/libntp/run-test-calendar.c rename to tests/libntp/run-calendar.c diff --git a/tests/libntp/run-test-caljulian.c b/tests/libntp/run-caljulian.c similarity index 100% rename from tests/libntp/run-test-caljulian.c rename to tests/libntp/run-caljulian.c diff --git a/tests/libntp/run-test-calyearstart.c b/tests/libntp/run-calyearstart.c similarity index 100% rename from tests/libntp/run-test-calyearstart.c rename to tests/libntp/run-calyearstart.c diff --git a/tests/libntp/run-test-clocktime.c b/tests/libntp/run-clocktime.c similarity index 100% rename from tests/libntp/run-test-clocktime.c rename to tests/libntp/run-clocktime.c diff --git a/tests/libntp/run-test-decodenetnum.c b/tests/libntp/run-decodenetnum.c similarity index 100% rename from tests/libntp/run-test-decodenetnum.c rename to tests/libntp/run-decodenetnum.c diff --git a/tests/libntp/run-test-hextoint.c b/tests/libntp/run-hextoint.c similarity index 100% rename from tests/libntp/run-test-hextoint.c rename to tests/libntp/run-hextoint.c diff --git a/tests/libntp/run-test-hextolfp.c b/tests/libntp/run-hextolfp.c similarity index 100% rename from tests/libntp/run-test-hextolfp.c rename to tests/libntp/run-hextolfp.c diff --git a/tests/libntp/run-test-lfpfunc.c b/tests/libntp/run-lfpfunc.c similarity index 100% rename from tests/libntp/run-test-lfpfunc.c rename to tests/libntp/run-lfpfunc.c diff --git a/tests/libntp/run-test-modetoa.c b/tests/libntp/run-modetoa.c similarity index 100% rename from tests/libntp/run-test-modetoa.c rename to tests/libntp/run-modetoa.c diff --git a/tests/libntp/run-test-netof.c b/tests/libntp/run-netof.c similarity index 100% rename from tests/libntp/run-test-netof.c rename to tests/libntp/run-netof.c diff --git a/tests/libntp/run-test-numtoa.c b/tests/libntp/run-numtoa.c similarity index 100% rename from tests/libntp/run-test-numtoa.c rename to tests/libntp/run-numtoa.c diff --git a/tests/libntp/run-test-numtohost.c b/tests/libntp/run-numtohost.c similarity index 100% rename from tests/libntp/run-test-numtohost.c rename to tests/libntp/run-numtohost.c diff --git a/tests/libntp/run-test-octtoint.c b/tests/libntp/run-octtoint.c similarity index 100% rename from tests/libntp/run-test-octtoint.c rename to tests/libntp/run-octtoint.c diff --git a/tests/libntp/run-test-refnumtoa.c b/tests/libntp/run-refnumtoa.c similarity index 100% rename from tests/libntp/run-test-refnumtoa.c rename to tests/libntp/run-refnumtoa.c diff --git a/tests/libntp/run-test-socktoa.c b/tests/libntp/run-socktoa.c similarity index 100% rename from tests/libntp/run-test-socktoa.c rename to tests/libntp/run-socktoa.c diff --git a/tests/libntp/run-test-statestr.c b/tests/libntp/run-statestr.c similarity index 100% rename from tests/libntp/run-test-statestr.c rename to tests/libntp/run-statestr.c diff --git a/tests/libntp/run-test-timespecops.c b/tests/libntp/run-timespecops.c similarity index 100% rename from tests/libntp/run-test-timespecops.c rename to tests/libntp/run-timespecops.c diff --git a/tests/libntp/run-test-timevalops.c b/tests/libntp/run-timevalops.c similarity index 100% rename from tests/libntp/run-test-timevalops.c rename to tests/libntp/run-timevalops.c diff --git a/tests/libntp/run-test-uglydate.c b/tests/libntp/run-uglydate.c similarity index 100% rename from tests/libntp/run-test-uglydate.c rename to tests/libntp/run-uglydate.c diff --git a/tests/libntp/run-test-vi64ops.c b/tests/libntp/run-vi64ops.c similarity index 100% rename from tests/libntp/run-test-vi64ops.c rename to tests/libntp/run-vi64ops.c diff --git a/tests/libntp/run-test-ymd2yd.c b/tests/libntp/run-ymd2yd.c similarity index 100% rename from tests/libntp/run-test-ymd2yd.c rename to tests/libntp/run-ymd2yd.c diff --git a/tests/sandbox/Makefile.am b/tests/sandbox/Makefile.am index 6f13e1b2d..c79e5be48 100644 --- a/tests/sandbox/Makefile.am +++ b/tests/sandbox/Makefile.am @@ -16,17 +16,17 @@ LDADD = \ $(LDADD_NTP) \ $(NULL) -AM_CFLAGS = $(CFLAGS_NTP) +AM_CFLAGS = $(CFLAGS_NTP) # HMS: we may not need some of these: -AM_CPPFLAGS = $(NTP_INCS) +AM_CPPFLAGS = $(NTP_INCS) AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_CPPFLAGS += -I$(top_srcdir)/include AM_CPPFLAGS += $(CPPFLAGS_NTP) AM_LDFLAGS = $(LDFLAGS_NTP) -bug_2803_SOURCES = \ +bug_2803_SOURCES = \ bug-2803.c \ run-ut-2803.c \ ut-2803.c \ @@ -34,27 +34,26 @@ bug_2803_SOURCES = \ $(srcdir)/run-ut-2803.c: $(srcdir)/ut-2803.c $(std_unity_list) $(run_unity) ut-2803.c run-ut-2803.c +BUILT_SOURCES += run-ut-2803.c -first_test_SOURCES = \ - uglydate.c \ - run-first-test.c \ +first_test_SOURCES = \ + uglydate.c \ + run-uglydate.c \ $(NULL) -$(srcdir)/run-first-test.c: $(srcdir)/uglydate.c $(std_unity_list) - $(run_unity) uglydate.c run-first-test.c +$(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list) + $(run_unity) uglydate.c run-uglydate.c +BUILT_SOURCES += run-uglydate.c -second_test_SOURCES = \ - modetoa.c \ - run-second-test.c \ - $(NULL) - -$(srcdir)/run-second-test.c: $(srcdir)/modetoa.c $(std_unity_list) - $(run_unity) modetoa.c run-second-test.c +second_test_SOURCES = \ + modetoa.c \ + run-modetoa.c \ + $(NULL) +$(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list) + $(run_unity) modetoa.c run-modetoa.c +BUILT_SOURCES += run-modetoa.c -# HMS: we may not need some of these: -#noinst_HEADERS = ntpdtest.h \ -# $(NULL) TESTS = diff --git a/tests/sandbox/run-second-test.c b/tests/sandbox/run-modetoa.c similarity index 100% rename from tests/sandbox/run-second-test.c rename to tests/sandbox/run-modetoa.c diff --git a/tests/sandbox/run-first-test.c b/tests/sandbox/run-uglydate.c similarity index 100% rename from tests/sandbox/run-first-test.c rename to tests/sandbox/run-uglydate.c