diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-02-22 10:20:31 +1030 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-03-24 13:59:32 +1030 |
commit | 859859154150bda0ba6c961a81e969dfe0305333 (patch) | |
tree | 45f192e0869b8fb0c9caed063562d981e0e6dd55 | |
parent | 5345c51ebff0c86f13bcc933c952b588c3b4a1ee (diff) | |
download | phosphor-mboxd-859859154150bda0ba6c961a81e969dfe0305333.tar.gz phosphor-mboxd-859859154150bda0ba6c961a81e969dfe0305333.zip |
test: Move related tests to vpnor directory
Change-Id: I5fe7f625ad642cef17fe53bd244dcde8fd99f3ad
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.am.include | 100 | ||||
-rw-r--r-- | test/vpnor/Makefile.am.include | 46 | ||||
-rw-r--r-- | test/vpnor/create_pnor_partition_table.cpp (renamed from test/create_pnor_partition_table.cpp) | 0 | ||||
-rw-r--r-- | test/vpnor/create_read_window_vpnor.cpp (renamed from test/create_read_window_vpnor.cpp) | 0 | ||||
-rw-r--r-- | test/vpnor/write_flash_vpnor.cpp (renamed from test/write_flash_vpnor.cpp) | 6 |
7 files changed, 80 insertions, 76 deletions
@@ -51,6 +51,7 @@ arm-openbmc-linux-gnueabi-libtool mboxctl /cscope.* /test/*.o +/test/vpnor/*.o # Autotools test infrastructure *.log diff --git a/Makefile.am b/Makefile.am index b1d86aa..09add65 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,9 @@ mboxctl_CFLAGS = $(LIBSYSTEMD_CFLAGS) @CODE_COVERAGE_RULES@ +check_PROGRAMS = + include test/Makefile.am.include +include test/vpnor/Makefile.am.include TESTS = $(check_PROGRAMS) diff --git a/test/Makefile.am.include b/test/Makefile.am.include index 045421d..6e687ed 100644 --- a/test/Makefile.am.include +++ b/test/Makefile.am.include @@ -102,77 +102,31 @@ test_sequence_numbers_SOURCES = %reldir%/sequence_numbers.c \ test_get_mbox_info_v2_timeout_SOURCES = %reldir%/get_mbox_info_v2_timeout.c \ $(TEST_MBOX_SRCS) $(TEST_MOCK_SRCS) -TEST_MBOX_VPNOR_SRCS = common.c pnor_partition_table.cpp - -test_create_pnor_partition_table_SOURCES = \ - $(TEST_MBOX_VPNOR_SRCS) \ - %reldir%/create_pnor_partition_table.cpp -test_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS) -test_create_pnor_partition_table_LDADD = -lstdc++fs \ - $(SDBUSPLUS_LIBS) \ - $(PHOSPHOR_LOGGING_LIBS) \ - $(PHOSPHOR_DBUS_INTERFACES_LIBS) - -test_create_read_window_vpnor_SOURCES = \ - $(TEST_MBOX_VPNOR_SRCS) $(TEST_MOCK_SRCS) \ - mboxd_msg.c \ - mboxd_windows.c \ - mboxd_lpc.c \ - mboxd_lpc_virtual.cpp \ - mboxd_pnor_partition_table.cpp \ - mboxd_flash_virtual.cpp \ - pnor_partition.cpp \ - %reldir%/create_read_window_vpnor.cpp -test_create_read_window_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) -test_create_read_window_vpnor_LDADD = -lstdc++fs \ - $(SDBUSPLUS_LIBS) \ - $(PHOSPHOR_LOGGING_LIBS) \ - $(PHOSPHOR_DBUS_INTERFACES_LIBS) - -test_write_flash_vpnor_SOURCES = \ - $(TEST_MBOX_VPNOR_SRCS) \ - mboxd_pnor_partition_table.cpp \ - mboxd_flash_virtual.cpp \ - mtd.c \ - pnor_partition.cpp \ - %reldir%/write_flash_vpnor.cpp -test_write_flash_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) -test_write_flash_vpnor_LDADD = -lstdc++fs \ - $(SDBUSPLUS_LIBS) \ - $(PHOSPHOR_LOGGING_LIBS) \ - $(PHOSPHOR_DBUS_INTERFACES_LIBS) - -check_PROGRAMS = %reldir%/sanity \ - %reldir%/copy_flash \ - %reldir%/erase_flash \ - %reldir%/write_flash \ - %reldir%/get_mbox_info_v2 \ - %reldir%/reset_state \ - %reldir%/get_flash_info_v2 \ - %reldir%/create_read_window_v2 \ - %reldir%/create_write_window_v2 \ - %reldir%/close_window_v2 \ - %reldir%/mark_write_dirty_v2 \ - %reldir%/write_flush_v2 \ - %reldir%/mark_write_erased_v2 \ - %reldir%/bmc_event_ack_v2 \ - %reldir%/create_oversize_window \ - %reldir%/create_zero_size_window \ - %reldir%/implicit_flush \ - %reldir%/request_high_version \ - %reldir%/request_low_version \ - %reldir%/mark_read_dirty \ - %reldir%/read_window_write_flush \ - %reldir%/read_window_mark_write_erased \ - %reldir%/write_window_dirty_erase \ - %reldir%/invalid_command \ - %reldir%/read_window_cycle \ - %reldir%/sequence_numbers \ - %reldir%/get_mbox_info_v2_timeout - -if VIRTUAL_PNOR_ENABLED check_PROGRAMS += \ - %reldir%/create_pnor_partition_table \ - %reldir%/create_read_window_vpnor \ - %reldir%/write_flash_vpnor -endif + %reldir%/sanity \ + %reldir%/copy_flash \ + %reldir%/erase_flash \ + %reldir%/write_flash \ + %reldir%/get_mbox_info_v2 \ + %reldir%/reset_state \ + %reldir%/get_flash_info_v2 \ + %reldir%/create_read_window_v2 \ + %reldir%/create_write_window_v2 \ + %reldir%/close_window_v2 \ + %reldir%/mark_write_dirty_v2 \ + %reldir%/write_flush_v2 \ + %reldir%/mark_write_erased_v2 \ + %reldir%/bmc_event_ack_v2 \ + %reldir%/create_oversize_window \ + %reldir%/create_zero_size_window \ + %reldir%/implicit_flush \ + %reldir%/request_high_version \ + %reldir%/request_low_version \ + %reldir%/mark_read_dirty \ + %reldir%/read_window_write_flush \ + %reldir%/read_window_mark_write_erased \ + %reldir%/write_window_dirty_erase \ + %reldir%/invalid_command \ + %reldir%/read_window_cycle \ + %reldir%/sequence_numbers \ + %reldir%/get_mbox_info_v2_timeout diff --git a/test/vpnor/Makefile.am.include b/test/vpnor/Makefile.am.include new file mode 100644 index 0000000..0b5b1c9 --- /dev/null +++ b/test/vpnor/Makefile.am.include @@ -0,0 +1,46 @@ +TEST_MBOX_VPNOR_SRCS = common.c pnor_partition_table.cpp + +test_vpnor_create_pnor_partition_table_SOURCES = \ + $(TEST_MBOX_VPNOR_SRCS) \ + %reldir%/create_pnor_partition_table.cpp +test_vpnor_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS) +test_vpnor_create_pnor_partition_table_LDADD = -lstdc++fs \ + $(SDBUSPLUS_LIBS) \ + $(PHOSPHOR_LOGGING_LIBS) \ + $(PHOSPHOR_DBUS_INTERFACES_LIBS) + +test_vpnor_create_read_window_vpnor_SOURCES = \ + $(TEST_MBOX_VPNOR_SRCS) $(TEST_MOCK_SRCS) \ + mboxd_msg.c \ + mboxd_windows.c \ + mboxd_lpc.c \ + mboxd_lpc_virtual.cpp \ + mboxd_pnor_partition_table.cpp \ + mboxd_flash_virtual.cpp \ + pnor_partition.cpp \ + %reldir%/create_read_window_vpnor.cpp +test_vpnor_create_read_window_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) +test_vpnor_create_read_window_vpnor_LDADD = -lstdc++fs \ + $(SDBUSPLUS_LIBS) \ + $(PHOSPHOR_LOGGING_LIBS) \ + $(PHOSPHOR_DBUS_INTERFACES_LIBS) + +test_vpnor_write_flash_vpnor_SOURCES = \ + $(TEST_MBOX_VPNOR_SRCS) \ + mboxd_pnor_partition_table.cpp \ + mboxd_flash_virtual.cpp \ + mtd.c \ + pnor_partition.cpp \ + %reldir%/write_flash_vpnor.cpp +test_vpnor_write_flash_vpnor_LDFLAGS = $(OESDK_TESTCASE_FLAGS) +test_vpnor_write_flash_vpnor_LDADD = -lstdc++fs \ + $(SDBUSPLUS_LIBS) \ + $(PHOSPHOR_LOGGING_LIBS) \ + $(PHOSPHOR_DBUS_INTERFACES_LIBS) + +if VIRTUAL_PNOR_ENABLED +check_PROGRAMS += \ + %reldir%/create_pnor_partition_table \ + %reldir%/create_read_window_vpnor \ + %reldir%/write_flash_vpnor +endif diff --git a/test/create_pnor_partition_table.cpp b/test/vpnor/create_pnor_partition_table.cpp index 57bb675..57bb675 100644 --- a/test/create_pnor_partition_table.cpp +++ b/test/vpnor/create_pnor_partition_table.cpp diff --git a/test/create_read_window_vpnor.cpp b/test/vpnor/create_read_window_vpnor.cpp index 3ea6bb5..3ea6bb5 100644 --- a/test/create_read_window_vpnor.cpp +++ b/test/vpnor/create_read_window_vpnor.cpp diff --git a/test/write_flash_vpnor.cpp b/test/vpnor/write_flash_vpnor.cpp index e78c79c..049cb94 100644 --- a/test/write_flash_vpnor.cpp +++ b/test/vpnor/write_flash_vpnor.cpp @@ -17,13 +17,13 @@ * */ +extern "C" { #include "config.h" +#include "common.h" +#include "mboxd_flash.h" #include "mboxd_pnor_partition_table.h" - -extern "C" { #include "mbox.h" #include "test/tmpf.h" -#include "mboxd_flash.h" } #include <assert.h> |