blob: 4f49644dc41d92b0b733005fde80e9a2a8a6038c [file] [log] [blame]
Andrew Jeffery22778042017-01-13 22:37:26 +10301ACLOCAL_AMFLAGS = -I m4
Suraj Jitindar Singhddf0edb2017-03-28 10:50:40 +11002sbin_PROGRAMS = mboxd mboxctl
Andrew Jeffery22778042017-01-13 22:37:26 +10303
Deepak Kodihalli393821d2017-04-28 04:44:38 -05004mboxd_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 Singhe39c9162017-03-28 10:47:43 +110013mboxd_LDFLAGS = $(LIBSYSTEMD_LIBS)
14mboxd_CFLAGS = $(LIBSYSTEMD_CFLAGS)
Suraj Jitindar Singhddf0edb2017-03-28 10:50:40 +110015
Deepak Kodihalli393821d2017-04-28 04:44:38 -050016if VIRTUAL_PNOR_ENABLED
Ratan Guptab0327582017-06-28 18:26:14 +053017mboxd_SOURCES += pnor_partition_table.cpp \
18 mboxd_pnor_partition_table.cpp \
Ratan Guptac0ef9872017-06-06 14:31:37 +053019 mboxd_flash_virtual.cpp \
20 pnor_partition.cpp
Ratan Guptab0327582017-06-28 18:26:14 +053021
22mboxd_LDFLAGS += -lstdc++fs \
23 $(SDBUSPLUS_LIBS) \
24 $(PHOSPHOR_LOGGING_LIBS) \
25 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
Deepak Kodihalli6c2fa902017-05-01 06:36:02 -050026else
27mboxd_SOURCES += mboxd_flash_physical.c
Deepak Kodihalli393821d2017-04-28 04:44:38 -050028endif
29
Suraj Jitindar Singhddf0edb2017-03-28 10:50:40 +110030mboxctl_SOURCES = mboxctl.c
31mboxctl_LDFLAGS = $(LIBSYSTEMD_LIBS)
32mboxctl_CFLAGS = $(LIBSYSTEMD_CFLAGS)
Andrew Jeffery65e21622017-04-12 20:25:31 +093033
34@CODE_COVERAGE_RULES@
35
36AM_LIBS = $(CODE_COVERAGE_LIBS)
37AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
38AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
Deepak Kodihalli393821d2017-04-28 04:44:38 -050039AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
Andrew Jeffery62af1ba2017-04-24 13:36:46 +093040
41test_sanity_SOURCES = test/sanity.c
42
Ratan Guptac0ef9872017-06-06 14:31:37 +053043test_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 Jeffery0484c752017-04-12 14:20:18 +093049
Ratan Guptac0ef9872017-06-06 14:31:37 +053050test_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 Jefferyf37ae022017-04-12 14:21:37 +093056
Ratan Guptac0ef9872017-06-06 14:31:37 +053057test_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 Jeffery26b35672017-04-12 14:22:25 +093063
Ratan Guptac0ef9872017-06-06 14:31:37 +053064TEST_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 Jefferyc1e7db32017-04-12 14:36:10 +093072TEST_MOCK_SRCS = test/tmpf.c test/mbox.c test/system.c
73
74test_get_mbox_info_v2_SOURCES = test/get_mbox_info_v2.c \
75 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
76
Andrew Jeffery16be9f62017-04-12 14:36:49 +093077test_reset_state_SOURCES = test/reset_state.c \
78 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
79
Andrew Jeffery182d4fe2017-04-12 14:39:24 +093080test_get_flash_info_v2_SOURCES = test/get_flash_info_v2.c \
81 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
82
Andrew Jeffery3e3cf282017-04-12 14:40:31 +093083test_create_read_window_v2_SOURCES = test/create_read_window_v2.c \
84 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
85
Andrew Jefferyccaec502017-04-12 14:42:36 +093086test_create_write_window_v2_SOURCES = test/create_write_window_v2.c \
87 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
88
Andrew Jefferyd8f24ef2017-04-12 14:43:57 +093089test_close_window_v2_SOURCES = test/close_window_v2.c \
90 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
91
Andrew Jeffery4397af92017-04-12 14:46:22 +093092test_mark_write_dirty_v2_SOURCES = test/mark_write_dirty_v2.c \
93 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
94
Andrew Jeffery1a036472017-04-12 14:47:03 +093095test_write_flush_v2_SOURCES = test/write_flush_v2.c \
96 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
97
Andrew Jefferyc5da1482017-04-12 14:49:07 +093098test_mark_write_erased_v2_SOURCES = test/mark_write_erased_v2.c \
99 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
100
Andrew Jeffery1770ce82017-04-12 14:50:32 +0930101test_bmc_event_ack_v2_SOURCES = test/bmc_event_ack_v2.c \
102 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
103
Andrew Jeffery5f374bc2017-04-12 22:06:06 +0930104test_create_oversize_window_SOURCES = test/create_oversize_window.c \
105 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
106
Andrew Jefferyefc6ada2017-04-12 22:13:59 +0930107test_create_zero_size_window_SOURCES = test/create_zero_size_window.c \
108 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
109
Andrew Jefferyd4a5fc82017-04-12 22:50:04 +0930110test_implicit_flush_SOURCES = test/implicit_flush.c \
111 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
112
Andrew Jeffery4510a192017-04-13 13:40:03 +0930113test_request_high_version_SOURCES = test/request_high_version.c \
114 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
115
Andrew Jefferybcacb4e2017-04-13 13:45:13 +0930116test_request_low_version_SOURCES = test/request_low_version.c \
117 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
118
Andrew Jefferyea469b02017-04-13 13:56:43 +0930119test_mark_read_dirty_SOURCES = test/mark_read_dirty.c \
120 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
121
Andrew Jefferyacdb4b32017-04-13 14:02:23 +0930122test_read_window_write_flush_SOURCES = test/read_window_write_flush.c \
123 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
124
Andrew Jefferyaed3a5f2017-04-13 14:44:26 +0930125test_read_window_mark_write_erased_SOURCES = test/read_window_mark_write_erased.c \
126 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
127
Andrew Jeffery4edb58c2017-04-13 15:10:15 +0930128test_write_window_dirty_erase_SOURCES = test/write_window_dirty_erase.c \
129 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
130
Andrew Jeffery9d4b8882017-04-13 15:39:45 +0930131test_invalid_command_SOURCES = test/invalid_command.c \
132 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
133
Andrew Jefferyb34cc542017-04-13 16:09:19 +0930134test_read_window_cycle_SOURCES = test/read_window_cycle.c \
135 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
136
Andrew Jefferycbbc13c2017-04-24 17:22:21 +0930137test_sequence_numbers_SOURCES = test/sequence_numbers.c \
138 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
139
Suraj Jitindar Singh29b3e8a2017-05-01 16:00:39 +1000140test_get_mbox_info_v2_timeout_SOURCES = test/get_mbox_info_v2_timeout.c \
141 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
142
Ratan Gupta3214b512017-05-11 08:58:19 +0530143TEST_MBOX_VPNOR_SRCS = common.c pnor_partition_table.cpp
144
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500145test_create_pnor_partition_table_SOURCES = \
Ratan Gupta3214b512017-05-11 08:58:19 +0530146 $(TEST_MBOX_VPNOR_SRCS) \
147 test/create_pnor_partition_table.cpp
Ratan Gupta99551ef2017-05-25 09:50:15 +0530148test_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
149test_create_pnor_partition_table_LDADD = -lstdc++fs
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500150
Ratan Gupta3214b512017-05-11 08:58:19 +0530151test_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 Guptac0ef9872017-06-06 14:31:37 +0530159 pnor_partition.cpp \
Ratan Gupta3214b512017-05-11 08:58:19 +0530160 test/create_read_window_vpnor.cpp
161test_create_read_window_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
Ratan Guptac0ef9872017-06-06 14:31:37 +0530162test_create_read_window_vpnor_LDADD = -lstdc++fs \
163 $(SDBUSPLUS_LIBS) \
164 $(PHOSPHOR_LOGGING_LIBS) \
165 $(PHOSPHOR_DBUS_INTERFACES_LIBS)
Ratan Gupta3214b512017-05-11 08:58:19 +0530166
Andrew Jeffery0484c752017-04-12 14:20:18 +0930167check_PROGRAMS = test/sanity \
Andrew Jefferyc1e7db32017-04-12 14:36:10 +0930168 test/copy_flash \
169 test/erase_flash \
170 test/write_flash \
Andrew Jeffery16be9f62017-04-12 14:36:49 +0930171 test/get_mbox_info_v2 \
Andrew Jeffery182d4fe2017-04-12 14:39:24 +0930172 test/reset_state \
Andrew Jeffery3e3cf282017-04-12 14:40:31 +0930173 test/get_flash_info_v2 \
Andrew Jefferyccaec502017-04-12 14:42:36 +0930174 test/create_read_window_v2 \
Andrew Jefferyd8f24ef2017-04-12 14:43:57 +0930175 test/create_write_window_v2 \
Andrew Jeffery4397af92017-04-12 14:46:22 +0930176 test/close_window_v2 \
Andrew Jeffery1a036472017-04-12 14:47:03 +0930177 test/mark_write_dirty_v2 \
Andrew Jefferyc5da1482017-04-12 14:49:07 +0930178 test/write_flush_v2 \
Andrew Jeffery1770ce82017-04-12 14:50:32 +0930179 test/mark_write_erased_v2 \
Andrew Jeffery5f374bc2017-04-12 22:06:06 +0930180 test/bmc_event_ack_v2 \
Andrew Jefferyefc6ada2017-04-12 22:13:59 +0930181 test/create_oversize_window \
Andrew Jefferyd4a5fc82017-04-12 22:50:04 +0930182 test/create_zero_size_window \
Andrew Jeffery4510a192017-04-13 13:40:03 +0930183 test/implicit_flush \
Andrew Jefferybcacb4e2017-04-13 13:45:13 +0930184 test/request_high_version \
Andrew Jefferyea469b02017-04-13 13:56:43 +0930185 test/request_low_version \
Andrew Jefferyacdb4b32017-04-13 14:02:23 +0930186 test/mark_read_dirty \
Andrew Jefferyaed3a5f2017-04-13 14:44:26 +0930187 test/read_window_write_flush \
Andrew Jeffery4edb58c2017-04-13 15:10:15 +0930188 test/read_window_mark_write_erased \
Andrew Jeffery9d4b8882017-04-13 15:39:45 +0930189 test/write_window_dirty_erase \
Andrew Jefferyb34cc542017-04-13 16:09:19 +0930190 test/invalid_command \
Andrew Jefferycbbc13c2017-04-24 17:22:21 +0930191 test/read_window_cycle \
Suraj Jitindar Singh29b3e8a2017-05-01 16:00:39 +1000192 test/sequence_numbers \
193 test/get_mbox_info_v2_timeout
Andrew Jeffery62af1ba2017-04-24 13:36:46 +0930194
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500195if VIRTUAL_PNOR_ENABLED
Ratan Guptac0ef9872017-06-06 14:31:37 +0530196check_PROGRAMS += \
197 test/create_pnor_partition_table \
198 test/create_read_window_vpnor
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500199endif
200
Andrew Jeffery62af1ba2017-04-24 13:36:46 +0930201TESTS = $(check_PROGRAMS)