Patrick Venture | 4679e50 | 2019-03-19 11:27:00 -0700 | [diff] [blame] | 1 | @VALGRIND_CHECK_RULES@ |
| 2 | |
Patrick Venture | 6bc04f9 | 2019-03-06 13:49:21 -0800 | [diff] [blame] | 3 | AM_CPPFLAGS = \ |
| 4 | -I$(top_srcdir)/ \ |
Patrick Venture | 360b9a3 | 2018-12-12 14:11:39 -0800 | [diff] [blame] | 5 | -I$(top_srcdir)/tools/ \ |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 6 | $(GTEST_CFLAGS) \ |
Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 7 | $(GMOCK_CFLAGS) \ |
| 8 | $(CODE_COVERAGE_CPPFLAGS) |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 9 | AM_CXXFLAGS = \ |
Patrick Venture | d333a87 | 2018-12-03 16:24:26 -0800 | [diff] [blame] | 10 | $(SDBUSPLUS_CFLAGS) \ |
Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 11 | $(PHOSPHOR_LOGGING_CFLAGS) \ |
| 12 | $(CODE_COVERAGE_CXXFLAGS) |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 13 | AM_LDFLAGS = \ |
Patrick Venture | 6bc04f9 | 2019-03-06 13:49:21 -0800 | [diff] [blame] | 14 | $(GTEST_LIBS) \ |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 15 | $(GMOCK_LIBS) \ |
Patrick Venture | 6bc04f9 | 2019-03-06 13:49:21 -0800 | [diff] [blame] | 16 | -lgmock_main \ |
Patrick Venture | 4eb5595 | 2018-11-16 15:36:24 -0800 | [diff] [blame] | 17 | $(OESDK_TESTCASE_FLAGS) \ |
Patrick Venture | d333a87 | 2018-12-03 16:24:26 -0800 | [diff] [blame] | 18 | $(SDBUSPLUS_LIBS) \ |
Patrick Venture | 2f3b4b6 | 2019-03-08 13:22:40 -0800 | [diff] [blame] | 19 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 20 | $(CODE_COVERAGE_LIBS) |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 21 | |
| 22 | # Run all 'check' test programs |
| 23 | check_PROGRAMS = \ |
Patrick Venture | d333a87 | 2018-12-03 16:24:26 -0800 | [diff] [blame] | 24 | firmware_createhandler_unittest \ |
Patrick Venture | de77b30 | 2018-11-06 15:38:04 -0800 | [diff] [blame] | 25 | firmware_handler_unittest \ |
Patrick Venture | df848ee | 2018-11-06 15:44:00 -0800 | [diff] [blame] | 26 | firmware_stat_unittest \ |
Patrick Venture | 72388d7 | 2018-11-07 15:06:36 -0800 | [diff] [blame] | 27 | firmware_canhandle_unittest \ |
Patrick Venture | 18235e6 | 2018-11-08 10:21:09 -0800 | [diff] [blame] | 28 | firmware_open_unittest \ |
Patrick Venture | 8c53533 | 2018-11-08 15:58:00 -0800 | [diff] [blame] | 29 | firmware_write_unittest \ |
Patrick Venture | 68bb143 | 2018-11-09 20:08:48 -0800 | [diff] [blame] | 30 | firmware_writemeta_unittest \ |
Patrick Venture | 9e5aab2 | 2018-11-09 20:49:28 -0800 | [diff] [blame] | 31 | firmware_close_unittest \ |
Patrick Venture | a17cf44 | 2018-11-15 09:31:51 -0800 | [diff] [blame] | 32 | firmware_delete_unittest \ |
Patrick Venture | cc7d160 | 2018-11-15 13:58:33 -0800 | [diff] [blame] | 33 | firmware_sessionstat_unittest \ |
Patrick Venture | ffcc550 | 2018-11-16 12:32:38 -0800 | [diff] [blame] | 34 | firmware_commit_unittest \ |
Patrick Venture | 997023d | 2019-05-23 07:41:26 -0700 | [diff] [blame] | 35 | file_handler_unittest \ |
Patrick Venture | ebcc522 | 2019-05-23 10:36:40 -0700 | [diff] [blame] | 36 | firmware_state_notyetstarted_unittest \ |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 37 | firmware_state_uploadinprogress_unittest \ |
Patrick Venture | 237e2c6 | 2019-05-23 20:35:33 -0700 | [diff] [blame] | 38 | firmware_state_verificationpending_unittest \ |
Patrick Venture | a82f99e | 2019-05-24 15:44:35 -0700 | [diff] [blame] | 39 | firmware_state_verificationstarted_unittest \ |
Patrick Venture | 0cd945c | 2019-05-30 13:36:53 -0700 | [diff] [blame] | 40 | firmware_state_verificationcompleted_unittest \ |
Patrick Venture | 16ab2a1 | 2019-05-31 08:52:51 -0700 | [diff] [blame] | 41 | firmware_state_updatepending_unittest \ |
Patrick Venture | 2098ff9 | 2019-06-03 10:18:05 -0700 | [diff] [blame^] | 42 | firmware_state_updatestarted_unittest \ |
| 43 | firmware_state_updatecompleted_unittest |
Patrick Venture | cf10cda | 2019-05-15 10:35:10 -0700 | [diff] [blame] | 44 | |
| 45 | if BUILD_HOST_TOOL |
| 46 | check_PROGRAMS += \ |
Patrick Venture | 907f3a7 | 2019-01-15 14:13:37 -0800 | [diff] [blame] | 47 | tools_bt_unittest \ |
Patrick Venture | 8e1b233 | 2019-01-17 15:22:45 -0800 | [diff] [blame] | 48 | tools_lpc_unittest \ |
Patrick Venture | 664c5bc | 2019-03-07 08:09:45 -0800 | [diff] [blame] | 49 | tools_updater_unittest |
Patrick Venture | cf10cda | 2019-05-15 10:35:10 -0700 | [diff] [blame] | 50 | endif |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 51 | |
| 52 | TESTS = $(check_PROGRAMS) |
| 53 | |
Patrick Venture | d333a87 | 2018-12-03 16:24:26 -0800 | [diff] [blame] | 54 | firmware_createhandler_unittest_SOURCES = firmware_createhandler_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 55 | firmware_createhandler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | d333a87 | 2018-12-03 16:24:26 -0800 | [diff] [blame] | 56 | |
Patrick Venture | de77b30 | 2018-11-06 15:38:04 -0800 | [diff] [blame] | 57 | firmware_handler_unittest_SOURCES = firmware_handler_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 58 | firmware_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 21be45a | 2018-11-06 12:08:52 -0800 | [diff] [blame] | 59 | |
Patrick Venture | de77b30 | 2018-11-06 15:38:04 -0800 | [diff] [blame] | 60 | firmware_stat_unittest_SOURCES = firmware_stat_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 61 | firmware_stat_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 46637c8 | 2018-11-06 15:20:24 -0800 | [diff] [blame] | 62 | |
Patrick Venture | df848ee | 2018-11-06 15:44:00 -0800 | [diff] [blame] | 63 | firmware_canhandle_unittest_SOURCES = firmware_canhandle_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 64 | firmware_canhandle_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 72388d7 | 2018-11-07 15:06:36 -0800 | [diff] [blame] | 65 | |
| 66 | firmware_open_unittest_SOURCES = firmware_open_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 67 | firmware_open_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 18235e6 | 2018-11-08 10:21:09 -0800 | [diff] [blame] | 68 | |
| 69 | firmware_write_unittest_SOURCES = firmware_write_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 70 | firmware_write_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 8c53533 | 2018-11-08 15:58:00 -0800 | [diff] [blame] | 71 | |
| 72 | firmware_writemeta_unittest_SOURCES = firmware_writemeta_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 73 | firmware_writemeta_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 68bb143 | 2018-11-09 20:08:48 -0800 | [diff] [blame] | 74 | |
| 75 | firmware_close_unittest_SOURCES = firmware_close_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 76 | firmware_close_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 9e5aab2 | 2018-11-09 20:49:28 -0800 | [diff] [blame] | 77 | |
| 78 | firmware_delete_unittest_SOURCES = firmware_delete_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 79 | firmware_delete_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | a17cf44 | 2018-11-15 09:31:51 -0800 | [diff] [blame] | 80 | |
Patrick Venture | cc7d160 | 2018-11-15 13:58:33 -0800 | [diff] [blame] | 81 | firmware_sessionstat_unittest_SOURCES = firmware_sessionstat_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 82 | firmware_sessionstat_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | cc7d160 | 2018-11-15 13:58:33 -0800 | [diff] [blame] | 83 | |
Patrick Venture | ffcc550 | 2018-11-16 12:32:38 -0800 | [diff] [blame] | 84 | firmware_commit_unittest_SOURCES = firmware_commit_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 85 | firmware_commit_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | ffcc550 | 2018-11-16 12:32:38 -0800 | [diff] [blame] | 86 | |
Patrick Venture | 7753d94 | 2018-11-15 13:15:36 -0800 | [diff] [blame] | 87 | file_handler_unittest_SOURCES = file_handler_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 88 | file_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la -lstdc++fs |
Patrick Venture | c79faa1 | 2018-12-12 13:12:21 -0800 | [diff] [blame] | 89 | |
Patrick Venture | 8a4f2aa | 2019-05-23 08:40:21 -0700 | [diff] [blame] | 90 | firmware_state_notyetstarted_unittest_SOURCES = firmware_state_notyetstarted_unittest.cpp |
| 91 | firmware_state_notyetstarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
Patrick Venture | 997023d | 2019-05-23 07:41:26 -0700 | [diff] [blame] | 92 | |
Patrick Venture | ebcc522 | 2019-05-23 10:36:40 -0700 | [diff] [blame] | 93 | firmware_state_uploadinprogress_unittest_SOURCES = firmware_state_uploadinprogress_unittest.cpp |
| 94 | firmware_state_uploadinprogress_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 95 | |
Patrick Venture | 61d2ed4 | 2019-05-23 18:16:31 -0700 | [diff] [blame] | 96 | firmware_state_verificationpending_unittest_SOURCES = firmware_state_verificationpending_unittest.cpp |
| 97 | firmware_state_verificationpending_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 98 | |
Patrick Venture | 237e2c6 | 2019-05-23 20:35:33 -0700 | [diff] [blame] | 99 | firmware_state_verificationstarted_unittest_SOURCES = firmware_state_verificationstarted_unittest.cpp |
| 100 | firmware_state_verificationstarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 101 | |
Patrick Venture | a82f99e | 2019-05-24 15:44:35 -0700 | [diff] [blame] | 102 | firmware_state_verificationcompleted_unittest_SOURCES = firmware_state_verificationcompleted_unittest.cpp |
| 103 | firmware_state_verificationcompleted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 104 | |
Patrick Venture | 0cd945c | 2019-05-30 13:36:53 -0700 | [diff] [blame] | 105 | firmware_state_updatepending_unittest_SOURCES = firmware_state_updatepending_unittest.cpp |
| 106 | firmware_state_updatepending_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 107 | |
Patrick Venture | 16ab2a1 | 2019-05-31 08:52:51 -0700 | [diff] [blame] | 108 | firmware_state_updatestarted_unittest_SOURCES = firmware_state_updatestarted_unittest.cpp |
| 109 | firmware_state_updatestarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 110 | |
Patrick Venture | 2098ff9 | 2019-06-03 10:18:05 -0700 | [diff] [blame^] | 111 | firmware_state_updatecompleted_unittest_SOURCES = firmware_state_updatecompleted_unittest.cpp |
| 112 | firmware_state_updatecompleted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la |
| 113 | |
Patrick Venture | cf10cda | 2019-05-15 10:35:10 -0700 | [diff] [blame] | 114 | if BUILD_HOST_TOOL |
Patrick Venture | 907f3a7 | 2019-01-15 14:13:37 -0800 | [diff] [blame] | 115 | tools_bt_unittest_SOURCES = tools_bt_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 116 | tools_bt_unittest_LDADD = $(top_builddir)/tools/libupdater.la |
Patrick Venture | 907f3a7 | 2019-01-15 14:13:37 -0800 | [diff] [blame] | 117 | |
Patrick Venture | 8e1b233 | 2019-01-17 15:22:45 -0800 | [diff] [blame] | 118 | tools_lpc_unittest_SOURCES = tools_lpc_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 119 | tools_lpc_unittest_LDADD = $(top_builddir)/tools/libupdater.la |
Patrick Venture | 8e1b233 | 2019-01-17 15:22:45 -0800 | [diff] [blame] | 120 | |
Patrick Venture | aa32a36 | 2018-12-13 10:52:33 -0800 | [diff] [blame] | 121 | tools_updater_unittest_SOURCES = tools_updater_unittest.cpp |
Patrick Venture | c897738 | 2019-03-19 08:48:28 -0700 | [diff] [blame] | 122 | tools_updater_unittest_LDADD = $(top_builddir)/tools/libupdater.la |
Patrick Venture | cf10cda | 2019-05-15 10:35:10 -0700 | [diff] [blame] | 123 | endif |