blob: b32e21038c1a3d63b159d8976a9a45dade64b7a5 [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 Subbannaca4ce1b2017-10-16 23:17:18 +05305check_PROGRAMS = test test_dns_updater test_watch
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 \
Nagaraju Goruganti067ca2d2018-01-17 01:12:00 -060012 test_rtnetlink.cpp \
Ratan Gupta2aca45c2017-07-26 01:16:27 +053013 test_config_parser.cpp \
14 test_vlan_interface.cpp
Ratan Gupta594123d2017-05-16 22:48:35 +053015
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053016test_dns_updater_SOURCES = test_dns_updater.cpp
Vishwanatha Subbannaca4ce1b2017-10-16 23:17:18 +053017test_watch_SOURCES = test_watch.cpp
Ratan Guptafc2c7242017-05-29 08:46:06 +053018
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053019generic_cpp_flags = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
Ratan Gupta594123d2017-05-16 22:48:35 +053020
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053021generic_cxx_flags = $(PTHREAD_CFLAGS) \
22 $(SYSTEMD_CFLAGS) \
23 $(SDBUSPLUS_CFLAGS) \
24 $(PHOSPHOR_LOGGING_CFLAGS) \
25 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
26
27generic_ld_flags = -lgtest_main -lgtest -lstdc++fs \
28 $(OESDK_TESTCASE_FLAGS) \
29 $(SYSTEMD_LIBS) \
30 $(SDBUSPLUS_LIBS) \
31 $(PHOSPHOR_LOGGING_LIBS) \
32 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
33
34test_CPPFLAGS = ${generic_cpp_flags}
35test_CXXFLAGS = ${generic_cxx_flags}
36test_LDFLAGS = ${generic_ld_flags}
37
38test_dns_updater_CPPFLAGS = ${generic_cpp_flags}
39test_dns_updater_CXXFLAGS = ${generic_cxx_flags}
40test_dns_updater_LDFLAGS = ${generic_ld_flags}
Ratan Gupta594123d2017-05-16 22:48:35 +053041
Vishwanatha Subbannaca4ce1b2017-10-16 23:17:18 +053042test_watch_CPPFLAGS = ${generic_cpp_flags}
43test_watch_CXXFLAGS = ${generic_cxx_flags}
44test_watch_LDFLAGS = ${generic_ld_flags}
45
Ratan Guptaeaefe582017-08-03 13:47:42 +053046test_LDADD = $(top_builddir)/ethernet_interface.o \
47 $(top_builddir)/network_manager.o \
48 $(top_builddir)/network_config.o \
49 $(top_builddir)/ipaddress.o \
50 $(top_builddir)/routing_table.o \
51 $(top_builddir)/util.o \
Ratan Guptae05083a2017-09-16 07:12:11 +053052 $(top_builddir)/timer.o \
Nagaraju Goruganti067ca2d2018-01-17 01:12:00 -060053 $(top_builddir)/rtnetlink_server.o \
Ratan Guptaeaefe582017-08-03 13:47:42 +053054 $(top_builddir)/system_configuration.o \
55 $(top_builddir)/dhcp_configuration.o \
56 $(top_builddir)/config_parser.o \
Ratan Gupta3d3e4fc2017-07-25 13:38:19 +053057 $(top_builddir)/vlan_interface.o \
Ratan Gupta8ab17922017-05-25 13:07:05 +053058 $(top_builddir)/xyz/openbmc_project/Network/VLAN/Create/phosphor_network_manager-server.o \
59 $(top_builddir)/xyz/openbmc_project/Network/IP/Create/phosphor_network_manager-server.o
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053060
61test_dns_updater_LDADD = $(top_builddir)/dns_updater.o
Vishwanatha Subbannaca4ce1b2017-10-16 23:17:18 +053062test_watch_LDADD = $(top_builddir)/watch.o