Andrew Jeffery | 2277804 | 2017-01-13 22:37:26 +1030 | [diff] [blame] | 1 | ACLOCAL_AMFLAGS = -I m4 |
Suraj Jitindar Singh | ddf0edb | 2017-03-28 10:50:40 +1100 | [diff] [blame] | 2 | sbin_PROGRAMS = mboxd mboxctl |
Andrew Jeffery | 2277804 | 2017-01-13 22:37:26 +1030 | [diff] [blame] | 3 | |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 4 | mboxd_SOURCES = \ |
| 5 | mboxd.c \ |
| 6 | common.c \ |
| 7 | mboxd_dbus.c \ |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 8 | mboxd_lpc.c \ |
| 9 | mboxd_msg.c \ |
| 10 | mboxd_windows.c \ |
| 11 | mtd.c |
Suraj Jitindar Singh | e39c916 | 2017-03-28 10:47:43 +1100 | [diff] [blame] | 12 | mboxd_LDFLAGS = $(LIBSYSTEMD_LIBS) |
| 13 | mboxd_CFLAGS = $(LIBSYSTEMD_CFLAGS) |
Suraj Jitindar Singh | ddf0edb | 2017-03-28 10:50:40 +1100 | [diff] [blame] | 14 | |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 15 | if VIRTUAL_PNOR_ENABLED |
Ratan Gupta | b032758 | 2017-06-28 18:26:14 +0530 | [diff] [blame] | 16 | mboxd_SOURCES += pnor_partition_table.cpp \ |
| 17 | mboxd_pnor_partition_table.cpp \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 18 | mboxd_flash_virtual.cpp \ |
Deepak Kodihalli | 017e45c | 2017-07-12 01:06:30 -0500 | [diff] [blame] | 19 | pnor_partition.cpp \ |
| 20 | mboxd_lpc_virtual.cpp |
Ratan Gupta | b032758 | 2017-06-28 18:26:14 +0530 | [diff] [blame] | 21 | |
| 22 | mboxd_LDFLAGS += -lstdc++fs \ |
| 23 | $(SDBUSPLUS_LIBS) \ |
| 24 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 25 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
Deepak Kodihalli | 6c2fa90 | 2017-05-01 06:36:02 -0500 | [diff] [blame] | 26 | else |
Deepak Kodihalli | 017e45c | 2017-07-12 01:06:30 -0500 | [diff] [blame] | 27 | mboxd_SOURCES += mboxd_flash_physical.c \ |
| 28 | mboxd_lpc_physical.c |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 29 | endif |
| 30 | |
Suraj Jitindar Singh | ddf0edb | 2017-03-28 10:50:40 +1100 | [diff] [blame] | 31 | mboxctl_SOURCES = mboxctl.c |
| 32 | mboxctl_LDFLAGS = $(LIBSYSTEMD_LIBS) |
| 33 | mboxctl_CFLAGS = $(LIBSYSTEMD_CFLAGS) |
Andrew Jeffery | 65e2162 | 2017-04-12 20:25:31 +0930 | [diff] [blame] | 34 | |
| 35 | @CODE_COVERAGE_RULES@ |
| 36 | |
| 37 | AM_LIBS = $(CODE_COVERAGE_LIBS) |
| 38 | AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) |
| 39 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 40 | AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) |
Andrew Jeffery | 62af1ba | 2017-04-24 13:36:46 +0930 | [diff] [blame] | 41 | |
| 42 | test_sanity_SOURCES = test/sanity.c |
| 43 | |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 44 | test_copy_flash_SOURCES = \ |
| 45 | test/copy_flash.c \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 46 | mboxd_flash_physical.c \ |
| 47 | common.c mtd.c \ |
| 48 | test/tmpf.c |
Andrew Jeffery | 0484c75 | 2017-04-12 14:20:18 +0930 | [diff] [blame] | 49 | |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 50 | test_erase_flash_SOURCES = \ |
| 51 | test/erase_flash.c \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 52 | mboxd_flash_physical.c \ |
| 53 | common.c \ |
| 54 | test/tmpf.c |
Andrew Jeffery | f37ae02 | 2017-04-12 14:21:37 +0930 | [diff] [blame] | 55 | |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 56 | test_write_flash_SOURCES = \ |
| 57 | test/write_flash.c \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 58 | mboxd_flash_physical.c \ |
| 59 | common.c \ |
| 60 | test/tmpf.c |
Andrew Jeffery | 26b3567 | 2017-04-12 14:22:25 +0930 | [diff] [blame] | 61 | |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 62 | TEST_MBOX_SRCS = \ |
| 63 | mboxd_msg.c \ |
| 64 | mboxd_windows.c \ |
| 65 | mboxd_lpc.c \ |
Deepak Kodihalli | 017e45c | 2017-07-12 01:06:30 -0500 | [diff] [blame] | 66 | mboxd_lpc_physical.c \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 67 | common.c \ |
| 68 | mboxd_flash_physical.c |
| 69 | |
Andrew Jeffery | c1e7db3 | 2017-04-12 14:36:10 +0930 | [diff] [blame] | 70 | TEST_MOCK_SRCS = test/tmpf.c test/mbox.c test/system.c |
| 71 | |
| 72 | test_get_mbox_info_v2_SOURCES = test/get_mbox_info_v2.c \ |
| 73 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 74 | |
Andrew Jeffery | 16be9f6 | 2017-04-12 14:36:49 +0930 | [diff] [blame] | 75 | test_reset_state_SOURCES = test/reset_state.c \ |
| 76 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 77 | |
Andrew Jeffery | 182d4fe | 2017-04-12 14:39:24 +0930 | [diff] [blame] | 78 | test_get_flash_info_v2_SOURCES = test/get_flash_info_v2.c \ |
| 79 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 80 | |
Andrew Jeffery | 3e3cf28 | 2017-04-12 14:40:31 +0930 | [diff] [blame] | 81 | test_create_read_window_v2_SOURCES = test/create_read_window_v2.c \ |
| 82 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 83 | |
Andrew Jeffery | ccaec50 | 2017-04-12 14:42:36 +0930 | [diff] [blame] | 84 | test_create_write_window_v2_SOURCES = test/create_write_window_v2.c \ |
| 85 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 86 | |
Andrew Jeffery | d8f24ef | 2017-04-12 14:43:57 +0930 | [diff] [blame] | 87 | test_close_window_v2_SOURCES = test/close_window_v2.c \ |
| 88 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 89 | |
Andrew Jeffery | 4397af9 | 2017-04-12 14:46:22 +0930 | [diff] [blame] | 90 | test_mark_write_dirty_v2_SOURCES = test/mark_write_dirty_v2.c \ |
| 91 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 92 | |
Andrew Jeffery | 1a03647 | 2017-04-12 14:47:03 +0930 | [diff] [blame] | 93 | test_write_flush_v2_SOURCES = test/write_flush_v2.c \ |
| 94 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 95 | |
Andrew Jeffery | c5da148 | 2017-04-12 14:49:07 +0930 | [diff] [blame] | 96 | test_mark_write_erased_v2_SOURCES = test/mark_write_erased_v2.c \ |
| 97 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 98 | |
Andrew Jeffery | 1770ce8 | 2017-04-12 14:50:32 +0930 | [diff] [blame] | 99 | test_bmc_event_ack_v2_SOURCES = test/bmc_event_ack_v2.c \ |
| 100 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 101 | |
Andrew Jeffery | 5f374bc | 2017-04-12 22:06:06 +0930 | [diff] [blame] | 102 | test_create_oversize_window_SOURCES = test/create_oversize_window.c \ |
| 103 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 104 | |
Andrew Jeffery | efc6ada | 2017-04-12 22:13:59 +0930 | [diff] [blame] | 105 | test_create_zero_size_window_SOURCES = test/create_zero_size_window.c \ |
| 106 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 107 | |
Andrew Jeffery | d4a5fc8 | 2017-04-12 22:50:04 +0930 | [diff] [blame] | 108 | test_implicit_flush_SOURCES = test/implicit_flush.c \ |
| 109 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 110 | |
Andrew Jeffery | 4510a19 | 2017-04-13 13:40:03 +0930 | [diff] [blame] | 111 | test_request_high_version_SOURCES = test/request_high_version.c \ |
| 112 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 113 | |
Andrew Jeffery | bcacb4e | 2017-04-13 13:45:13 +0930 | [diff] [blame] | 114 | test_request_low_version_SOURCES = test/request_low_version.c \ |
| 115 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 116 | |
Andrew Jeffery | ea469b0 | 2017-04-13 13:56:43 +0930 | [diff] [blame] | 117 | test_mark_read_dirty_SOURCES = test/mark_read_dirty.c \ |
| 118 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 119 | |
Andrew Jeffery | acdb4b3 | 2017-04-13 14:02:23 +0930 | [diff] [blame] | 120 | test_read_window_write_flush_SOURCES = test/read_window_write_flush.c \ |
| 121 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 122 | |
Andrew Jeffery | aed3a5f | 2017-04-13 14:44:26 +0930 | [diff] [blame] | 123 | test_read_window_mark_write_erased_SOURCES = test/read_window_mark_write_erased.c \ |
| 124 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 125 | |
Andrew Jeffery | 4edb58c | 2017-04-13 15:10:15 +0930 | [diff] [blame] | 126 | test_write_window_dirty_erase_SOURCES = test/write_window_dirty_erase.c \ |
| 127 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 128 | |
Andrew Jeffery | 9d4b888 | 2017-04-13 15:39:45 +0930 | [diff] [blame] | 129 | test_invalid_command_SOURCES = test/invalid_command.c \ |
| 130 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 131 | |
Andrew Jeffery | b34cc54 | 2017-04-13 16:09:19 +0930 | [diff] [blame] | 132 | test_read_window_cycle_SOURCES = test/read_window_cycle.c \ |
| 133 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 134 | |
Andrew Jeffery | cbbc13c | 2017-04-24 17:22:21 +0930 | [diff] [blame] | 135 | test_sequence_numbers_SOURCES = test/sequence_numbers.c \ |
| 136 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 137 | |
Suraj Jitindar Singh | 29b3e8a | 2017-05-01 16:00:39 +1000 | [diff] [blame] | 138 | test_get_mbox_info_v2_timeout_SOURCES = test/get_mbox_info_v2_timeout.c \ |
| 139 | $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) |
| 140 | |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 141 | TEST_MBOX_VPNOR_SRCS = common.c pnor_partition_table.cpp |
| 142 | |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 143 | test_create_pnor_partition_table_SOURCES = \ |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 144 | $(TEST_MBOX_VPNOR_SRCS) \ |
| 145 | test/create_pnor_partition_table.cpp |
Ratan Gupta | 99551ef | 2017-05-25 09:50:15 +0530 | [diff] [blame] | 146 | test_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS) |
Deepak Kodihalli | 8a89969 | 2017-07-11 23:17:19 -0500 | [diff] [blame] | 147 | test_create_pnor_partition_table_LDADD = -lstdc++fs \ |
| 148 | $(SDBUSPLUS_LIBS) \ |
| 149 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 150 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 151 | |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 152 | test_create_read_window_vpnor_SOURCES = \ |
| 153 | $(TEST_MBOX_VPNOR_SRCS) $(TEST_MOCK_SRCS) \ |
| 154 | mboxd_msg.c \ |
| 155 | mboxd_windows.c \ |
| 156 | mboxd_lpc.c \ |
Deepak Kodihalli | 017e45c | 2017-07-12 01:06:30 -0500 | [diff] [blame] | 157 | mboxd_lpc_virtual.cpp \ |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 158 | mboxd_pnor_partition_table.cpp \ |
| 159 | mboxd_flash_virtual.cpp \ |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 160 | pnor_partition.cpp \ |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 161 | test/create_read_window_vpnor.cpp |
| 162 | test_create_read_window_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 163 | test_create_read_window_vpnor_LDADD = -lstdc++fs \ |
| 164 | $(SDBUSPLUS_LIBS) \ |
| 165 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 166 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
Ratan Gupta | 3214b51 | 2017-05-11 08:58:19 +0530 | [diff] [blame] | 167 | |
Ratan Gupta | 2407f15 | 2017-05-31 16:01:01 +0530 | [diff] [blame] | 168 | test_write_flash_vpnor_SOURCES = \ |
| 169 | $(TEST_MBOX_VPNOR_SRCS) \ |
Ratan Gupta | 2407f15 | 2017-05-31 16:01:01 +0530 | [diff] [blame] | 170 | mboxd_pnor_partition_table.cpp \ |
| 171 | mboxd_flash_virtual.cpp \ |
| 172 | mtd.c \ |
| 173 | pnor_partition.cpp \ |
| 174 | test/write_flash_vpnor.cpp |
| 175 | test_write_flash_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) |
| 176 | test_write_flash_vpnor_LDADD = -lstdc++fs \ |
| 177 | $(SDBUSPLUS_LIBS) \ |
| 178 | $(PHOSPHOR_LOGGING_LIBS) \ |
| 179 | $(PHOSPHOR_DBUS_INTERFACES_LIBS) |
| 180 | |
Andrew Jeffery | 0484c75 | 2017-04-12 14:20:18 +0930 | [diff] [blame] | 181 | check_PROGRAMS = test/sanity \ |
Andrew Jeffery | c1e7db3 | 2017-04-12 14:36:10 +0930 | [diff] [blame] | 182 | test/copy_flash \ |
| 183 | test/erase_flash \ |
| 184 | test/write_flash \ |
Andrew Jeffery | 16be9f6 | 2017-04-12 14:36:49 +0930 | [diff] [blame] | 185 | test/get_mbox_info_v2 \ |
Andrew Jeffery | 182d4fe | 2017-04-12 14:39:24 +0930 | [diff] [blame] | 186 | test/reset_state \ |
Andrew Jeffery | 3e3cf28 | 2017-04-12 14:40:31 +0930 | [diff] [blame] | 187 | test/get_flash_info_v2 \ |
Andrew Jeffery | ccaec50 | 2017-04-12 14:42:36 +0930 | [diff] [blame] | 188 | test/create_read_window_v2 \ |
Andrew Jeffery | d8f24ef | 2017-04-12 14:43:57 +0930 | [diff] [blame] | 189 | test/create_write_window_v2 \ |
Andrew Jeffery | 4397af9 | 2017-04-12 14:46:22 +0930 | [diff] [blame] | 190 | test/close_window_v2 \ |
Andrew Jeffery | 1a03647 | 2017-04-12 14:47:03 +0930 | [diff] [blame] | 191 | test/mark_write_dirty_v2 \ |
Andrew Jeffery | c5da148 | 2017-04-12 14:49:07 +0930 | [diff] [blame] | 192 | test/write_flush_v2 \ |
Andrew Jeffery | 1770ce8 | 2017-04-12 14:50:32 +0930 | [diff] [blame] | 193 | test/mark_write_erased_v2 \ |
Andrew Jeffery | 5f374bc | 2017-04-12 22:06:06 +0930 | [diff] [blame] | 194 | test/bmc_event_ack_v2 \ |
Andrew Jeffery | efc6ada | 2017-04-12 22:13:59 +0930 | [diff] [blame] | 195 | test/create_oversize_window \ |
Andrew Jeffery | d4a5fc8 | 2017-04-12 22:50:04 +0930 | [diff] [blame] | 196 | test/create_zero_size_window \ |
Andrew Jeffery | 4510a19 | 2017-04-13 13:40:03 +0930 | [diff] [blame] | 197 | test/implicit_flush \ |
Andrew Jeffery | bcacb4e | 2017-04-13 13:45:13 +0930 | [diff] [blame] | 198 | test/request_high_version \ |
Andrew Jeffery | ea469b0 | 2017-04-13 13:56:43 +0930 | [diff] [blame] | 199 | test/request_low_version \ |
Andrew Jeffery | acdb4b3 | 2017-04-13 14:02:23 +0930 | [diff] [blame] | 200 | test/mark_read_dirty \ |
Andrew Jeffery | aed3a5f | 2017-04-13 14:44:26 +0930 | [diff] [blame] | 201 | test/read_window_write_flush \ |
Andrew Jeffery | 4edb58c | 2017-04-13 15:10:15 +0930 | [diff] [blame] | 202 | test/read_window_mark_write_erased \ |
Andrew Jeffery | 9d4b888 | 2017-04-13 15:39:45 +0930 | [diff] [blame] | 203 | test/write_window_dirty_erase \ |
Andrew Jeffery | b34cc54 | 2017-04-13 16:09:19 +0930 | [diff] [blame] | 204 | test/invalid_command \ |
Andrew Jeffery | cbbc13c | 2017-04-24 17:22:21 +0930 | [diff] [blame] | 205 | test/read_window_cycle \ |
Suraj Jitindar Singh | 29b3e8a | 2017-05-01 16:00:39 +1000 | [diff] [blame] | 206 | test/sequence_numbers \ |
| 207 | test/get_mbox_info_v2_timeout |
Andrew Jeffery | 62af1ba | 2017-04-24 13:36:46 +0930 | [diff] [blame] | 208 | |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 209 | if VIRTUAL_PNOR_ENABLED |
Ratan Gupta | c0ef987 | 2017-06-06 14:31:37 +0530 | [diff] [blame] | 210 | check_PROGRAMS += \ |
| 211 | test/create_pnor_partition_table \ |
Ratan Gupta | 2407f15 | 2017-05-31 16:01:01 +0530 | [diff] [blame] | 212 | test/create_read_window_vpnor \ |
| 213 | test/write_flash_vpnor |
Deepak Kodihalli | 393821d | 2017-04-28 04:44:38 -0500 | [diff] [blame] | 214 | endif |
| 215 | |
Andrew Jeffery | 62af1ba | 2017-04-24 13:36:46 +0930 | [diff] [blame] | 216 | TESTS = $(check_PROGRAMS) |