blob: 45dab5f69722fe32e114d5c13eb52c03bb18c62c [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
Ratan Guptab4005972019-09-19 06:19:16 +05305check_PROGRAMS = test
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 \
William A. Kennington IIIc920bdb2019-04-19 14:23:06 -070010 test_neighbor.cpp \
11 test_netlink.cpp \
Ratan Gupta47722dc2017-05-26 18:32:23 +053012 test_network_manager.cpp \
Ratan Gupta2aca45c2017-07-26 01:16:27 +053013 test_ethernet_interface.cpp \
Nagaraju Goruganti067ca2d2018-01-17 01:12:00 -060014 test_rtnetlink.cpp \
Ratan Gupta2aca45c2017-07-26 01:16:27 +053015 test_config_parser.cpp \
16 test_vlan_interface.cpp
Ratan Gupta594123d2017-05-16 22:48:35 +053017
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053018generic_cpp_flags = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
Ratan Gupta594123d2017-05-16 22:48:35 +053019
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053020generic_cxx_flags = $(PTHREAD_CFLAGS) \
21 $(SYSTEMD_CFLAGS) \
22 $(SDBUSPLUS_CFLAGS) \
William A. Kennington III3a70fa22018-09-20 18:48:20 -070023 $(SDEVENTPLUS_CFLAGS) \
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053024 $(PHOSPHOR_LOGGING_CFLAGS) \
25 $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
26
Ratan Gupta35297172018-11-28 18:40:16 +053027generic_ld_flags = -lgtest_main -lgtest -lgmock -lstdc++fs \
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053028 $(OESDK_TESTCASE_FLAGS) \
29 $(SYSTEMD_LIBS) \
30 $(SDBUSPLUS_LIBS) \
William A. Kennington III3a70fa22018-09-20 18:48:20 -070031 $(SDEVENTPLUS_LIBS) \
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053032 $(PHOSPHOR_LOGGING_LIBS) \
33 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
34
35test_CPPFLAGS = ${generic_cpp_flags}
36test_CXXFLAGS = ${generic_cxx_flags}
William A. Kennington IIIcb64b992019-04-21 18:45:07 -070037test_LDFLAGS = ${generic_ld_flags} -ldl
Vishwanatha Subbannaf00182e2017-10-16 19:08:59 +053038
Ratan Guptaeaefe582017-08-03 13:47:42 +053039test_LDADD = $(top_builddir)/ethernet_interface.o \
40 $(top_builddir)/network_manager.o \
41 $(top_builddir)/network_config.o \
42 $(top_builddir)/ipaddress.o \
William A. Kennington III08505792019-01-30 16:00:04 -080043 $(top_builddir)/neighbor.o \
William A. Kennington IIIc920bdb2019-04-19 14:23:06 -070044 $(top_builddir)/netlink.o \
Ratan Guptaeaefe582017-08-03 13:47:42 +053045 $(top_builddir)/routing_table.o \
46 $(top_builddir)/util.o \
Nagaraju Goruganti067ca2d2018-01-17 01:12:00 -060047 $(top_builddir)/rtnetlink_server.o \
Ratan Guptaeaefe582017-08-03 13:47:42 +053048 $(top_builddir)/system_configuration.o \
49 $(top_builddir)/dhcp_configuration.o \
50 $(top_builddir)/config_parser.o \
Ratan Gupta3d3e4fc2017-07-25 13:38:19 +053051 $(top_builddir)/vlan_interface.o \
Ratan Gupta8ab17922017-05-25 13:07:05 +053052 $(top_builddir)/xyz/openbmc_project/Network/VLAN/Create/phosphor_network_manager-server.o \
William A. Kennington III08505792019-01-30 16:00:04 -080053 $(top_builddir)/xyz/openbmc_project/Network/IP/Create/phosphor_network_manager-server.o \
54 $(top_builddir)/xyz/openbmc_project/Network/Neighbor/CreateStatic/phosphor_network_manager-server.o