blob: 4f4f9a12b91597edf7d1feae3f23297ebc7fc232 [file] [log] [blame]
Vishwanatha Subbanna035a9692017-09-15 18:50:43 +05301AM_CPPFLAGS = -I$(top_srcdir)
2
3# Run all 'check' test programs
4TESTS = $(check_PROGRAMS)
5
Sumanth Bhat736648e2019-03-06 14:19:25 +05306cppflags = -Igtest \
7 $(GTEST_CPPFLAGS) \
8 $(AM_CPPFLAGS) \
9 $(PHOSPHOR_LOGGING_CFLAGS) \
10 $(SDBUSPLUS_CFLAGS)
Vishwanatha Subbanna035a9692017-09-15 18:50:43 +053011
Sumanth Bhat736648e2019-03-06 14:19:25 +053012cxxflags = $(PTHREAD_CFLAGS)
Vishwanatha Subbanna035a9692017-09-15 18:50:43 +053013
Sumanth Bhat736648e2019-03-06 14:19:25 +053014ldflags = -lgtest_main \
15 -lgtest \
16 $(PTHREAD_LIBS) \
17 $(OESDK_TESTCASE_FLAGS) \
18 $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
19 $(PHOSPHOR_LOGGING_LIBS) \
20 $(SDBUSPLUS_LIBS) \
21 -lcrypt \
22 -lstdc++fs
Vishwanatha Subbanna035a9692017-09-15 18:50:43 +053023
Sumanth Bhat736648e2019-03-06 14:19:25 +053024check_PROGRAMS = ldap_config_test
25ldap_config_test_CPPFLAGS = $(cppflags)
26ldap_config_test_CXXFLAGS = $(cxxflags)
27ldap_config_test_LDFLAGS = $(ldflags) \
Nagaraju Gorugantid514e5d2018-11-08 03:07:25 -060028 -lldap \
29 -lgmock
30ldap_config_test_SOURCES = ldap_config_test.cpp utils_test.cpp
Ratan Gupta37fb3fe2019-04-13 12:54:18 +053031ldap_config_test_LDADD = $(top_builddir)/phosphor-ldap-config/ldap_config.o \
Ratan Gupta95a29312019-02-18 20:34:10 +053032 $(top_builddir)/phosphor-ldap-config/utils.o \
Ratan Gupta7b04c352019-04-12 21:46:29 +053033 $(top_builddir)/phosphor-ldap-config/ldap_config_mgr.o \
34 $(top_builddir)/phosphor-ldap-config/ldap_mapper_entry.o \
35 $(top_builddir)/phosphor-ldap-config/ldap_mapper_serialize.o
Tom Josephf870b482018-11-19 09:55:45 +053036
37check_PROGRAMS += ldap_mapper_test
Sumanth Bhat736648e2019-03-06 14:19:25 +053038ldap_mapper_test_CPPFLAGS = $(cppflags)
39ldap_mapper_test_CXXFLAGS = $(cxxflags)
40ldap_mapper_test_LDFLAGS = $(ldflags)
Tom Josephf870b482018-11-19 09:55:45 +053041ldap_mapper_test_SOURCES = ldap_mapper_test.cpp
42ldap_mapper_test_LDADD = $(top_builddir)/phosphor-ldap-mapper/ldap_mapper_entry.o \
43 $(top_builddir)/phosphor-ldap-mapper/ldap_mapper_mgr.o \
44 $(top_builddir)/phosphor-ldap-mapper/ldap_mapper_serialize.o
raviteja-b8cc44052019-02-27 23:29:36 -060045
46check_PROGRAMS += user_mgr_test
47user_mgr_test_CPPFLAGS = $(cppflags)
48user_mgr_test_CXXFLAGS = $(cxxflags) $(GTEST_CPPFLAGS)
49user_mgr_test_LDFLAGS = $(ldflags) $(GTEST_LIBS) $(GMOCK_LIBS) -lgmock
50user_mgr_test_SOURCES = user_mgr_test.cpp
51user_mgr_test_LDADD = $(top_builddir)/user_mgr.o \
52 $(top_builddir)/users.o