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