blob: ce9b1194182d7fe5000f597f368eed68181ff69a [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
Deepak Kodihalli6c2fa902017-05-01 06:36:02 -050017mboxd_SOURCES += pnor_partition_table.cpp mboxd_pnor_partition_table.cpp mboxd_flash_virtual.cpp
Deepak Kodihalli393821d2017-04-28 04:44:38 -050018mboxd_LDFLAGS += -lstdc++fs
Deepak Kodihalli6c2fa902017-05-01 06:36:02 -050019else
20mboxd_SOURCES += mboxd_flash_physical.c
Deepak Kodihalli393821d2017-04-28 04:44:38 -050021endif
22
Suraj Jitindar Singhddf0edb2017-03-28 10:50:40 +110023mboxctl_SOURCES = mboxctl.c
24mboxctl_LDFLAGS = $(LIBSYSTEMD_LIBS)
25mboxctl_CFLAGS = $(LIBSYSTEMD_CFLAGS)
Andrew Jeffery65e21622017-04-12 20:25:31 +093026
27@CODE_COVERAGE_RULES@
28
29AM_LIBS = $(CODE_COVERAGE_LIBS)
30AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
31AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
Deepak Kodihalli393821d2017-04-28 04:44:38 -050032AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
Andrew Jeffery62af1ba2017-04-24 13:36:46 +093033
34test_sanity_SOURCES = test/sanity.c
35
Deepak Kodihalli6c2fa902017-05-01 06:36:02 -050036test_copy_flash_SOURCES = test/copy_flash.c mboxd_flash.c mboxd_flash_physical.c common.c mtd.c test/tmpf.c
Andrew Jeffery0484c752017-04-12 14:20:18 +093037
Andrew Jefferyf37ae022017-04-12 14:21:37 +093038test_erase_flash_SOURCES = test/erase_flash.c mboxd_flash.c common.c test/tmpf.c
39
Andrew Jeffery26b35672017-04-12 14:22:25 +093040test_write_flash_SOURCES = test/write_flash.c mboxd_flash.c common.c test/tmpf.c
41
Deepak Kodihalli6c2fa902017-05-01 06:36:02 -050042TEST_MBOX_SRCS = mboxd_msg.c mboxd_windows.c mboxd_lpc.c mboxd_flash.c common.c mboxd_flash_physical.c
Andrew Jefferyc1e7db32017-04-12 14:36:10 +093043TEST_MOCK_SRCS = test/tmpf.c test/mbox.c test/system.c
44
45test_get_mbox_info_v2_SOURCES = test/get_mbox_info_v2.c \
46 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
47
Andrew Jeffery16be9f62017-04-12 14:36:49 +093048test_reset_state_SOURCES = test/reset_state.c \
49 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
50
Andrew Jeffery182d4fe2017-04-12 14:39:24 +093051test_get_flash_info_v2_SOURCES = test/get_flash_info_v2.c \
52 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
53
Andrew Jeffery3e3cf282017-04-12 14:40:31 +093054test_create_read_window_v2_SOURCES = test/create_read_window_v2.c \
55 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
56
Andrew Jefferyccaec502017-04-12 14:42:36 +093057test_create_write_window_v2_SOURCES = test/create_write_window_v2.c \
58 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
59
Andrew Jefferyd8f24ef2017-04-12 14:43:57 +093060test_close_window_v2_SOURCES = test/close_window_v2.c \
61 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
62
Andrew Jeffery4397af92017-04-12 14:46:22 +093063test_mark_write_dirty_v2_SOURCES = test/mark_write_dirty_v2.c \
64 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
65
Andrew Jeffery1a036472017-04-12 14:47:03 +093066test_write_flush_v2_SOURCES = test/write_flush_v2.c \
67 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
68
Andrew Jefferyc5da1482017-04-12 14:49:07 +093069test_mark_write_erased_v2_SOURCES = test/mark_write_erased_v2.c \
70 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
71
Andrew Jeffery1770ce82017-04-12 14:50:32 +093072test_bmc_event_ack_v2_SOURCES = test/bmc_event_ack_v2.c \
73 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
74
Andrew Jeffery5f374bc2017-04-12 22:06:06 +093075test_create_oversize_window_SOURCES = test/create_oversize_window.c \
76 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
77
Andrew Jefferyefc6ada2017-04-12 22:13:59 +093078test_create_zero_size_window_SOURCES = test/create_zero_size_window.c \
79 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
80
Andrew Jefferyd4a5fc82017-04-12 22:50:04 +093081test_implicit_flush_SOURCES = test/implicit_flush.c \
82 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
83
Andrew Jeffery4510a192017-04-13 13:40:03 +093084test_request_high_version_SOURCES = test/request_high_version.c \
85 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
86
Andrew Jefferybcacb4e2017-04-13 13:45:13 +093087test_request_low_version_SOURCES = test/request_low_version.c \
88 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
89
Andrew Jefferyea469b02017-04-13 13:56:43 +093090test_mark_read_dirty_SOURCES = test/mark_read_dirty.c \
91 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
92
Andrew Jefferyacdb4b32017-04-13 14:02:23 +093093test_read_window_write_flush_SOURCES = test/read_window_write_flush.c \
94 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
95
Andrew Jefferyaed3a5f2017-04-13 14:44:26 +093096test_read_window_mark_write_erased_SOURCES = test/read_window_mark_write_erased.c \
97 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
98
Andrew Jeffery4edb58c2017-04-13 15:10:15 +093099test_write_window_dirty_erase_SOURCES = test/write_window_dirty_erase.c \
100 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
101
Andrew Jeffery9d4b8882017-04-13 15:39:45 +0930102test_invalid_command_SOURCES = test/invalid_command.c \
103 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
104
Andrew Jefferyb34cc542017-04-13 16:09:19 +0930105test_read_window_cycle_SOURCES = test/read_window_cycle.c \
106 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
107
Andrew Jefferycbbc13c2017-04-24 17:22:21 +0930108test_sequence_numbers_SOURCES = test/sequence_numbers.c \
109 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
110
Suraj Jitindar Singh29b3e8a2017-05-01 16:00:39 +1000111test_get_mbox_info_v2_timeout_SOURCES = test/get_mbox_info_v2_timeout.c \
112 $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS)
113
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500114test_create_pnor_partition_table_SOURCES = \
115 test/create_pnor_partition_table.cpp \
116 common.c \
117 pnor_partition_table.cpp
Ratan Gupta99551ef2017-05-25 09:50:15 +0530118test_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
119test_create_pnor_partition_table_LDADD = -lstdc++fs
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500120
Andrew Jeffery0484c752017-04-12 14:20:18 +0930121check_PROGRAMS = test/sanity \
Andrew Jefferyc1e7db32017-04-12 14:36:10 +0930122 test/copy_flash \
123 test/erase_flash \
124 test/write_flash \
Andrew Jeffery16be9f62017-04-12 14:36:49 +0930125 test/get_mbox_info_v2 \
Andrew Jeffery182d4fe2017-04-12 14:39:24 +0930126 test/reset_state \
Andrew Jeffery3e3cf282017-04-12 14:40:31 +0930127 test/get_flash_info_v2 \
Andrew Jefferyccaec502017-04-12 14:42:36 +0930128 test/create_read_window_v2 \
Andrew Jefferyd8f24ef2017-04-12 14:43:57 +0930129 test/create_write_window_v2 \
Andrew Jeffery4397af92017-04-12 14:46:22 +0930130 test/close_window_v2 \
Andrew Jeffery1a036472017-04-12 14:47:03 +0930131 test/mark_write_dirty_v2 \
Andrew Jefferyc5da1482017-04-12 14:49:07 +0930132 test/write_flush_v2 \
Andrew Jeffery1770ce82017-04-12 14:50:32 +0930133 test/mark_write_erased_v2 \
Andrew Jeffery5f374bc2017-04-12 22:06:06 +0930134 test/bmc_event_ack_v2 \
Andrew Jefferyefc6ada2017-04-12 22:13:59 +0930135 test/create_oversize_window \
Andrew Jefferyd4a5fc82017-04-12 22:50:04 +0930136 test/create_zero_size_window \
Andrew Jeffery4510a192017-04-13 13:40:03 +0930137 test/implicit_flush \
Andrew Jefferybcacb4e2017-04-13 13:45:13 +0930138 test/request_high_version \
Andrew Jefferyea469b02017-04-13 13:56:43 +0930139 test/request_low_version \
Andrew Jefferyacdb4b32017-04-13 14:02:23 +0930140 test/mark_read_dirty \
Andrew Jefferyaed3a5f2017-04-13 14:44:26 +0930141 test/read_window_write_flush \
Andrew Jeffery4edb58c2017-04-13 15:10:15 +0930142 test/read_window_mark_write_erased \
Andrew Jeffery9d4b8882017-04-13 15:39:45 +0930143 test/write_window_dirty_erase \
Andrew Jefferyb34cc542017-04-13 16:09:19 +0930144 test/invalid_command \
Andrew Jefferycbbc13c2017-04-24 17:22:21 +0930145 test/read_window_cycle \
Suraj Jitindar Singh29b3e8a2017-05-01 16:00:39 +1000146 test/sequence_numbers \
147 test/get_mbox_info_v2_timeout
Andrew Jeffery62af1ba2017-04-24 13:36:46 +0930148
Deepak Kodihalli393821d2017-04-28 04:44:38 -0500149if VIRTUAL_PNOR_ENABLED
150check_PROGRAMS += test/create_pnor_partition_table
151endif
152
Andrew Jeffery62af1ba2017-04-24 13:36:46 +0930153TESTS = $(check_PROGRAMS)