blob: 5c70fbec082bc8846042cee9e2b83191256385a1 [file] [log] [blame]
Ratan Gupta8ab17922017-05-25 13:07:05 +05301AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir}
Ratan Gupta594123d2017-05-16 22:48:35 +05302
3TESTS = $(check_PROGRAMS)
4
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +05305check_PROGRAMS = test test_dns_updater
Ratan Gupta594123d2017-05-16 22:48:35 +05306
7test_SOURCES = \
Ratan Gupta8ab17922017-05-25 13:07:05 +05308 test_util.cpp \
9 mock_syscall.cpp \
Ratan Gupta47722dc2017-05-26 18:32:23 +053010 test_network_manager.cpp \
Ratan Gupta2aca45c2017-07-26 01:16:27 +053011 test_ethernet_interface.cpp \
12 test_config_parser.cpp \
13 test_vlan_interface.cpp
Ratan Gupta594123d2017-05-16 22:48:35 +053014
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053015test_dns_updater_SOURCES = test_dns_updater.cpp
Ratan Guptafc2c7242017-05-29 08:46:06 +053016
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053017generic_cpp_flags = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
Ratan Gupta594123d2017-05-16 22:48:35 +053018
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053019generic_cxx_flags = $(PTHREAD_CFLAGS) \
20 $(SYSTEMD_CFLAGS) \
21 $(SDBUSPLUS_CFLAGS) \
22 $(PHOSPHOR_LOGGING_CFLAGS) \
23 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
24
25generic_ld_flags = -lgtest_main -lgtest -lstdc++fs \
26 $(OESDK_TESTCASE_FLAGS) \
27 $(SYSTEMD_LIBS) \
28 $(SDBUSPLUS_LIBS) \
29 $(PHOSPHOR_LOGGING_LIBS) \
30 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
31
32test_CPPFLAGS = ${generic_cpp_flags}
33test_CXXFLAGS = ${generic_cxx_flags}
34test_LDFLAGS = ${generic_ld_flags}
35
36test_dns_updater_CPPFLAGS = ${generic_cpp_flags}
37test_dns_updater_CXXFLAGS = ${generic_cxx_flags}
38test_dns_updater_LDFLAGS = ${generic_ld_flags}
Ratan Gupta594123d2017-05-16 22:48:35 +053039
Ratan Guptaeaefe582017-08-03 13:47:42 +053040test_LDADD = $(top_builddir)/ethernet_interface.o \
41 $(top_builddir)/network_manager.o \
42 $(top_builddir)/network_config.o \
43 $(top_builddir)/ipaddress.o \
44 $(top_builddir)/routing_table.o \
45 $(top_builddir)/util.o \
Ratan Guptae05083a2017-09-16 07:12:11 +053046 $(top_builddir)/timer.o \
Ratan Guptaeaefe582017-08-03 13:47:42 +053047 $(top_builddir)/system_configuration.o \
48 $(top_builddir)/dhcp_configuration.o \
49 $(top_builddir)/config_parser.o \
Ratan Gupta3d3e4fc2017-07-25 13:38:19 +053050 $(top_builddir)/vlan_interface.o \
Ratan Gupta8ab17922017-05-25 13:07:05 +053051 $(top_builddir)/xyz/openbmc_project/Network/VLAN/Create/phosphor_network_manager-server.o \
52 $(top_builddir)/xyz/openbmc_project/Network/IP/Create/phosphor_network_manager-server.o
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053053
54test_dns_updater_LDADD = $(top_builddir)/dns_updater.o