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