phosphor-rsyslog-conf: add unit tests
Add tests related to setting remote server IP address and port.
Change-Id: I35ac539a8316d34245ee6b1abcb9f48c1ebe5095
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 68ad467..0db1650 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -5,7 +5,9 @@
check_PROGRAMS = \
elog_errorwrap_test \
serialization_test_path \
- serialization_test_properties
+ serialization_test_properties \
+ remote_logging_test_address \
+ remote_logging_test_port
test_cppflags = \
-Igtest \
@@ -35,6 +37,7 @@
$(top_builddir)/elog-lookup.o \
$(top_builddir)/elog-process-metadata.o
+remote_logging_test_ldadd = $(top_builddir)/phosphor-rsyslog-config/server-conf.o
elog_errorwrap_test_CPPFLAGS = $(test_cppflags)
elog_errorwrap_test_CXXFLAGS = $(test_cxxflags)
@@ -59,3 +62,19 @@
serialization_test_properties_LDFLAGS = \
$(test_ldflags) \
-lstdc++fs
+
+remote_logging_test_address_CPPFLAGS = $(test_cppflags)
+remote_logging_test_address_CXXFLAGS = $(test_cxxflags)
+remote_logging_test_address_SOURCES = remote_logging_test_address.cpp
+remote_logging_test_address_LDADD = $(remote_logging_test_ldadd)
+remote_logging_test_address_LDFLAGS = \
+ $(test_ldflags) \
+ -lstdc++fs
+
+remote_logging_test_port_CPPFLAGS = $(test_cppflags)
+remote_logging_test_port_CXXFLAGS = $(test_cxxflags)
+remote_logging_test_port_SOURCES = remote_logging_test_port.cpp
+remote_logging_test_port_LDADD = $(remote_logging_test_ldadd)
+remote_logging_test_port_LDFLAGS = \
+ $(test_ldflags) \
+ -lstdc++fs