blob: 8aca7f1bed6940f7dbb14ed77bec84922744e327 [file] [log] [blame]
Patrick Venture4679e502019-03-19 11:27:00 -07001@VALGRIND_CHECK_RULES@
2
Patrick Venture6bc04f92019-03-06 13:49:21 -08003AM_CPPFLAGS = \
4 -I$(top_srcdir)/ \
Patrick Venture360b9a32018-12-12 14:11:39 -08005 -I$(top_srcdir)/tools/ \
Patrick Venture21be45a2018-11-06 12:08:52 -08006 $(GTEST_CFLAGS) \
Patrick Venture2f3b4b62019-03-08 13:22:40 -08007 $(GMOCK_CFLAGS) \
8 $(CODE_COVERAGE_CPPFLAGS)
Patrick Venture21be45a2018-11-06 12:08:52 -08009AM_CXXFLAGS = \
Patrick Ventured333a872018-12-03 16:24:26 -080010 $(SDBUSPLUS_CFLAGS) \
Patrick Venture2f3b4b62019-03-08 13:22:40 -080011 $(PHOSPHOR_LOGGING_CFLAGS) \
12 $(CODE_COVERAGE_CXXFLAGS)
Patrick Venture21be45a2018-11-06 12:08:52 -080013AM_LDFLAGS = \
Patrick Venture6bc04f92019-03-06 13:49:21 -080014 $(GTEST_LIBS) \
Patrick Venture21be45a2018-11-06 12:08:52 -080015 $(GMOCK_LIBS) \
Patrick Venture6bc04f92019-03-06 13:49:21 -080016 -lgmock_main \
Patrick Venture4eb55952018-11-16 15:36:24 -080017 $(OESDK_TESTCASE_FLAGS) \
Patrick Ventured333a872018-12-03 16:24:26 -080018 $(SDBUSPLUS_LIBS) \
Patrick Venture2f3b4b62019-03-08 13:22:40 -080019 $(PHOSPHOR_LOGGING_LIBS) \
20 $(CODE_COVERAGE_LIBS)
Patrick Venture21be45a2018-11-06 12:08:52 -080021
22# Run all 'check' test programs
23check_PROGRAMS = \
Patrick Ventured333a872018-12-03 16:24:26 -080024 firmware_createhandler_unittest \
Patrick Venturede77b302018-11-06 15:38:04 -080025 firmware_handler_unittest \
Patrick Venturedf848ee2018-11-06 15:44:00 -080026 firmware_stat_unittest \
Patrick Venture72388d72018-11-07 15:06:36 -080027 firmware_canhandle_unittest \
Patrick Venture18235e62018-11-08 10:21:09 -080028 firmware_open_unittest \
Patrick Venture8c535332018-11-08 15:58:00 -080029 firmware_write_unittest \
Patrick Venture68bb1432018-11-09 20:08:48 -080030 firmware_writemeta_unittest \
Patrick Venture9e5aab22018-11-09 20:49:28 -080031 firmware_close_unittest \
Patrick Venturea17cf442018-11-15 09:31:51 -080032 firmware_delete_unittest \
Patrick Venturecc7d1602018-11-15 13:58:33 -080033 firmware_sessionstat_unittest \
Patrick Ventureffcc5502018-11-16 12:32:38 -080034 firmware_commit_unittest \
Patrick Venture997023d2019-05-23 07:41:26 -070035 file_handler_unittest \
Patrick Ventureebcc5222019-05-23 10:36:40 -070036 firmware_state_notyetstarted_unittest \
Patrick Venture61d2ed42019-05-23 18:16:31 -070037 firmware_state_uploadinprogress_unittest \
Patrick Venture237e2c62019-05-23 20:35:33 -070038 firmware_state_verificationpending_unittest \
Patrick Venturea82f99e2019-05-24 15:44:35 -070039 firmware_state_verificationstarted_unittest \
Patrick Venture0cd945c2019-05-30 13:36:53 -070040 firmware_state_verificationcompleted_unittest \
41 firmware_state_updatepending_unittest
Patrick Venturecf10cda2019-05-15 10:35:10 -070042
43if BUILD_HOST_TOOL
44check_PROGRAMS += \
Patrick Venture907f3a72019-01-15 14:13:37 -080045 tools_bt_unittest \
Patrick Venture8e1b2332019-01-17 15:22:45 -080046 tools_lpc_unittest \
Patrick Venture664c5bc2019-03-07 08:09:45 -080047 tools_updater_unittest
Patrick Venturecf10cda2019-05-15 10:35:10 -070048endif
Patrick Venture21be45a2018-11-06 12:08:52 -080049
50TESTS = $(check_PROGRAMS)
51
Patrick Ventured333a872018-12-03 16:24:26 -080052firmware_createhandler_unittest_SOURCES = firmware_createhandler_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070053firmware_createhandler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Ventured333a872018-12-03 16:24:26 -080054
Patrick Venturede77b302018-11-06 15:38:04 -080055firmware_handler_unittest_SOURCES = firmware_handler_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070056firmware_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture21be45a2018-11-06 12:08:52 -080057
Patrick Venturede77b302018-11-06 15:38:04 -080058firmware_stat_unittest_SOURCES = firmware_stat_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070059firmware_stat_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture46637c82018-11-06 15:20:24 -080060
Patrick Venturedf848ee2018-11-06 15:44:00 -080061firmware_canhandle_unittest_SOURCES = firmware_canhandle_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070062firmware_canhandle_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture72388d72018-11-07 15:06:36 -080063
64firmware_open_unittest_SOURCES = firmware_open_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070065firmware_open_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture18235e62018-11-08 10:21:09 -080066
67firmware_write_unittest_SOURCES = firmware_write_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070068firmware_write_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture8c535332018-11-08 15:58:00 -080069
70firmware_writemeta_unittest_SOURCES = firmware_writemeta_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070071firmware_writemeta_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture68bb1432018-11-09 20:08:48 -080072
73firmware_close_unittest_SOURCES = firmware_close_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070074firmware_close_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture9e5aab22018-11-09 20:49:28 -080075
76firmware_delete_unittest_SOURCES = firmware_delete_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070077firmware_delete_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venturea17cf442018-11-15 09:31:51 -080078
Patrick Venturecc7d1602018-11-15 13:58:33 -080079firmware_sessionstat_unittest_SOURCES = firmware_sessionstat_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070080firmware_sessionstat_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venturecc7d1602018-11-15 13:58:33 -080081
Patrick Ventureffcc5502018-11-16 12:32:38 -080082firmware_commit_unittest_SOURCES = firmware_commit_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070083firmware_commit_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Ventureffcc5502018-11-16 12:32:38 -080084
Patrick Venture7753d942018-11-15 13:15:36 -080085file_handler_unittest_SOURCES = file_handler_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -070086file_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la -lstdc++fs
Patrick Venturec79faa12018-12-12 13:12:21 -080087
Patrick Venture8a4f2aa2019-05-23 08:40:21 -070088firmware_state_notyetstarted_unittest_SOURCES = firmware_state_notyetstarted_unittest.cpp
89firmware_state_notyetstarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
Patrick Venture997023d2019-05-23 07:41:26 -070090
Patrick Ventureebcc5222019-05-23 10:36:40 -070091firmware_state_uploadinprogress_unittest_SOURCES = firmware_state_uploadinprogress_unittest.cpp
92firmware_state_uploadinprogress_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
93
Patrick Venture61d2ed42019-05-23 18:16:31 -070094firmware_state_verificationpending_unittest_SOURCES = firmware_state_verificationpending_unittest.cpp
95firmware_state_verificationpending_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
96
Patrick Venture237e2c62019-05-23 20:35:33 -070097firmware_state_verificationstarted_unittest_SOURCES = firmware_state_verificationstarted_unittest.cpp
98firmware_state_verificationstarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
99
Patrick Venturea82f99e2019-05-24 15:44:35 -0700100firmware_state_verificationcompleted_unittest_SOURCES = firmware_state_verificationcompleted_unittest.cpp
101firmware_state_verificationcompleted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
102
Patrick Venture0cd945c2019-05-30 13:36:53 -0700103firmware_state_updatepending_unittest_SOURCES = firmware_state_updatepending_unittest.cpp
104firmware_state_updatepending_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
105
Patrick Venturecf10cda2019-05-15 10:35:10 -0700106if BUILD_HOST_TOOL
Patrick Venture907f3a72019-01-15 14:13:37 -0800107tools_bt_unittest_SOURCES = tools_bt_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -0700108tools_bt_unittest_LDADD = $(top_builddir)/tools/libupdater.la
Patrick Venture907f3a72019-01-15 14:13:37 -0800109
Patrick Venture8e1b2332019-01-17 15:22:45 -0800110tools_lpc_unittest_SOURCES = tools_lpc_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -0700111tools_lpc_unittest_LDADD = $(top_builddir)/tools/libupdater.la
Patrick Venture8e1b2332019-01-17 15:22:45 -0800112
Patrick Ventureaa32a362018-12-13 10:52:33 -0800113tools_updater_unittest_SOURCES = tools_updater_unittest.cpp
Patrick Venturec8977382019-03-19 08:48:28 -0700114tools_updater_unittest_LDADD = $(top_builddir)/tools/libupdater.la
Patrick Venturecf10cda2019-05-15 10:35:10 -0700115endif