From: Harlan Stenn Date: Sat, 4 Jul 2015 03:49:10 +0000 (+0000) Subject: Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5525ce86c48ad83f971c84bec3d441d480bf6acd;p=thirdparty%2Fntp.git Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. bk: 559757b69mM5cqQLOzwnu844a-XtWw --- diff --git a/ChangeLog b/ChangeLog index 480098ca2..bdc52c2ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. * Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. * tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. --- (4.2.8p3) 2015/06/29 Released by Harlan Stenn diff --git a/sntp/tests/Makefile.am b/sntp/tests/Makefile.am index 1a19068f4..619256733 100644 --- a/sntp/tests/Makefile.am +++ b/sntp/tests/Makefile.am @@ -21,22 +21,11 @@ check_PROGRAMS = \ test-utilities \ $(NULL) -if GTEST_AVAILABLE -check_PROGRAMS += tests -else EXTRA_PROGRAMS += tests -endif - -#if BUILD_SNTP -#check_PROGRAMS += tests -#endif - -base_SOURCES = \ - ../tests_main.cpp \ - $(NULL) tests_SOURCES = \ - $(base_SOURCES) \ + ../tests_main.cpp \ + g_crypto.cpp \ g_fileHandlingTest.h \ g_networking.cpp \ g_packetHandling.cpp \ @@ -44,17 +33,19 @@ tests_SOURCES = \ g_sntptest.h \ $(NULL) -# HMS: this test was for the 4.2.6 sntp code. -# g_nameresolution.cpp +tests_LDADD = \ + $(base_LDADD) \ + $(GTEST_LDFLAGS) \ + $(GTEST_LIBS) \ + $(NULL) + +tests_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(CPPFLAGS) \ + $(GTEST_CPPFLAGS) \ + $(NULL) -# HMS: Somebody needs to audit the following files to -# make sure all of these tests are now handled by Unity -# -# g_utilities.cpp -# g_kodDatabase.cpp -# g_keyFile.cpp -# g_crypto.cpp -# g_kodFile.cpp +AM_CXXFLAGS = $(GTEST_CXXFLAGS) noinst_HEADERS = \ fileHandlingTest.h \ @@ -89,35 +80,32 @@ CLEANFILES += \ $(NULL) #split into LDADD and tests_LDADD? -LDADD = \ +base_LDADD = \ ../libsntp.a \ $(LIBOPTS_LDADD) \ $(LDADD_LIBEVENT) \ $(top_builddir)/../libntp/libntp.a \ $(LDADD_LIBNTP) \ $(LDADD_NTP) \ - $(GTEST_LDFLAGS) \ - $(GTEST_LIBS) \ $(NULL) -unity_tests_LDADD = \ - $(LDADD) \ +LDADD = \ + $(base_LDADD) \ $(top_builddir)/unity/libunity.a \ $(LIBM) \ $(NULL) -AM_CFLAGS = $(CFLAGS_NTP) -AM_CXXFLAGS = $(GTEST_CXXFLAGS) +AM_CFLAGS = $(CFLAGS_NTP) AM_CPPFLAGS = $(SNTP_INCS) AM_CPPFLAGS += -I$(srcdir)/.. AM_CPPFLAGS += -I$(top_srcdir)/../tests AM_CPPFLAGS += $(LIBOPTS_CFLAGS) AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT) -AM_CPPFLAGS += $(GTEST_CPPFLAGS) AM_CPPFLAGS += $(CPPFLAGS_NTP) AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity +#AM_CPPFLAGS += -I$(top_srcdir)/unity AM_LDFLAGS = $(LDFLAGS_NTP) @@ -132,70 +120,6 @@ BUILT_SOURCES += \ $(srcdir)/run-packetHandling.c \ $(NULL) -test_keyFile_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_keyFile_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_kodDatabase_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_kodDatabase_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_kodFile_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_kodFile_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_networking_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_networking_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_utilities_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_utilities_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_crypto_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_crypto_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_packetProcessing_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_packetProcessing_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - -test_packetHandling_CFLAGS = \ - -I$(top_srcdir)/unity \ - $(NULL) - -test_packetHandling_LDADD = \ - $(unity_tests_LDADD) \ - $(NULL) - test_networking_SOURCES = \ networking.c \ run-networking.c \ @@ -225,7 +149,6 @@ test_kodFile_SOURCES = \ run-kodFile.c \ $(top_builddir)/version.c \ $(NULL) -# ../version.c test_packetProcessing_SOURCES = \ packetProcessing.c \