test: Move vpnor tests to vpnor directory
In the spirit of things that are together should be kept together. The
repository layout now better corresponds to upstream with the exception
of the vpnor directory and some modifications to Makefile.am
Change-Id: I16d59a3c9ee846065f6a8c83eb4459715d525f3f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/.gitignore b/.gitignore
index af6c720..4b8eb95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,7 +52,7 @@
mboxctl
/cscope.*
/test/*.o
-/test/vpnor/*.o
+/vpnor/test/*.o
# Autotools test infrastructure
*.log
diff --git a/Makefile.am b/Makefile.am
index 1bc69c6..384af50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,6 @@
XFAIL_TESTS =
include test/Makefile.am.include
-include test/vpnor/Makefile.am.include
+include vpnor/test/Makefile.am.include
TESTS = $(check_PROGRAMS)
diff --git a/test/vpnor/Makefile.am.include b/test/vpnor/Makefile.am.include
deleted file mode 100644
index 0e6e030..0000000
--- a/test/vpnor/Makefile.am.include
+++ /dev/null
@@ -1,267 +0,0 @@
-TEST_MBOX_VPNOR_SRCS = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/tmpd.cpp
-
-TEST_MBOX_VPNOR_INTEG_SRCS = \
- common.c \
- mboxd_msg.c \
- mboxd_windows.c \
- mboxd_lpc.c \
- vpnor/mboxd_lpc_reset.cpp \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- vpnor/pnor_partition_table.cpp \
- %reldir%/tmpd.cpp
-
-VPNOR_LDADD = -lstdc++fs \
- $(SDBUSPLUS_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS)
-
-test_vpnor_create_pnor_partition_table_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_pnor_partition_table.cpp
-test_vpnor_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_pnor_partition_table_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_partition_exists_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_partition_exists.cpp
-test_vpnor_create_read_window_partition_exists_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_partition_exists_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_write_patch_SOURCES = \
- $(TEST_MBOX_VPNOR_SRCS) \
- mtd.c \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- %reldir%/write_patch.cpp
-test_vpnor_write_patch_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_write_patch_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_write_prsv_SOURCES = \
- $(TEST_MBOX_VPNOR_SRCS) \
- mtd.c \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- %reldir%/write_prsv.cpp
-test_vpnor_write_prsv_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_write_prsv_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_write_ro_SOURCES = \
- $(TEST_MBOX_VPNOR_SRCS) \
- mtd.c \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- %reldir%/write_ro.cpp
-test_vpnor_write_ro_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_write_ro_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_write_rw_SOURCES = \
- $(TEST_MBOX_VPNOR_SRCS) \
- mtd.c \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- %reldir%/write_rw.cpp
-test_vpnor_write_rw_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_write_rw_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_no_name_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_no_name.cpp
-test_vpnor_toc_no_name_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_no_name_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_start_gt_end_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_start_gt_end.cpp
-test_vpnor_toc_start_gt_end_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_start_gt_end_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_no_start_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_no_start.cpp
-test_vpnor_toc_no_start_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_no_start_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_no_end_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_no_end.cpp
-test_vpnor_toc_no_end_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_no_end_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_no_version_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_no_version.cpp
-test_vpnor_toc_no_version_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_no_version_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_flags_SOURCES = \
- common.c \
- vpnor/pnor_partition_table.cpp \
- %reldir%/toc_flags.cpp
-test_vpnor_toc_flags_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_flags_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_overlap_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/toc_overlap.cpp
-test_vpnor_toc_overlap_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_overlap_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_lookup_found_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/toc_lookup_found.cpp
-test_vpnor_toc_lookup_found_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_lookup_found_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_lookup_failed_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/toc_lookup_failed.cpp
-test_vpnor_toc_lookup_failed_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_lookup_failed_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_toc_missing_file_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/toc_missing_file.cpp
-test_vpnor_toc_missing_file_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_toc_missing_file_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_oob_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_oob.cpp
-test_vpnor_create_read_window_oob_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_oob_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_toc_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_toc.cpp
-test_vpnor_create_read_window_toc_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_toc_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_straddle_partitions_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_straddle_partitions.cpp
-test_vpnor_create_read_window_straddle_partitions_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_straddle_partitions_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_partition_invalid_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_partition_invalid.cpp
-test_vpnor_create_read_window_partition_invalid_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_partition_invalid_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_read_patch_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/read_patch.cpp
-test_vpnor_read_patch_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_read_patch_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_write_patch_resize_SOURCES = \
- $(TEST_MBOX_VPNOR_SRCS) \
- mtd.c \
- vpnor/mboxd_pnor_partition_table.cpp \
- vpnor/mboxd_flash.cpp \
- vpnor/pnor_partition.cpp \
- %reldir%/write_patch_resize.cpp
-test_vpnor_write_patch_resize_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_write_patch_resize_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_dump_flash_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/dump_flash.cpp
-test_vpnor_dump_flash_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_dump_flash_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_size_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_size.cpp
-test_vpnor_create_read_window_size_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_size_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_read_window_remap_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_read_window_remap.cpp
-test_vpnor_create_read_window_remap_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_read_window_remap_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_write_window_ro_partition_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_write_window_ro_partition.cpp
-test_vpnor_create_write_window_ro_partition_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_write_window_ro_partition_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_write_window_rw_partition_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_write_window_rw_partition.cpp
-test_vpnor_create_write_window_rw_partition_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_write_window_rw_partition_LDADD = $(VPNOR_LDADD)
-
-test_vpnor_create_write_window_unmapped_SOURCES = \
- $(TEST_MOCK_SRCS) \
- $(TEST_MBOX_VPNOR_INTEG_SRCS) \
- %reldir%/create_write_window_unmapped.cpp
-test_vpnor_create_write_window_unmapped_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
-test_vpnor_create_write_window_unmapped_LDADD = $(VPNOR_LDADD)
-
-if VIRTUAL_PNOR_ENABLED
-check_PROGRAMS += \
- %reldir%/create_pnor_partition_table \
- %reldir%/create_read_window_partition_exists \
- %reldir%/write_prsv \
- %reldir%/write_ro \
- %reldir%/write_rw \
- %reldir%/write_patch \
- %reldir%/toc_no_name \
- %reldir%/toc_start_gt_end \
- %reldir%/toc_no_start \
- %reldir%/toc_no_end \
- %reldir%/toc_no_version \
- %reldir%/toc_flags \
- %reldir%/toc_overlap \
- %reldir%/toc_lookup_found \
- %reldir%/toc_lookup_failed \
- %reldir%/toc_missing_file \
- %reldir%/create_read_window_oob \
- %reldir%/create_read_window_toc \
- %reldir%/create_read_window_straddle_partitions \
- %reldir%/create_read_window_partition_invalid \
- %reldir%/read_patch \
- %reldir%/write_patch_resize \
- %reldir%/dump_flash \
- %reldir%/create_read_window_size \
- %reldir%/create_read_window_remap \
- %reldir%/create_write_window_ro_partition \
- %reldir%/create_write_window_rw_partition \
- %reldir%/create_write_window_unmapped
-
-XFAIL_TESTS += %reldir%/create_write_window_ro_partition
-XFAIL_TESTS += %reldir%/create_write_window_unmapped
-endif
diff --git a/vpnor/test/Makefile.am.include b/vpnor/test/Makefile.am.include
new file mode 100644
index 0000000..9a81d9c
--- /dev/null
+++ b/vpnor/test/Makefile.am.include
@@ -0,0 +1,267 @@
+TEST_MBOX_VPNOR_SRCS = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/tmpd.cpp
+
+TEST_MBOX_VPNOR_INTEG_SRCS = \
+ common.c \
+ mboxd_msg.c \
+ mboxd_windows.c \
+ mboxd_lpc.c \
+ vpnor/mboxd_lpc_reset.cpp \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/tmpd.cpp
+
+VPNOR_LDADD = -lstdc++fs \
+ $(SDBUSPLUS_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(PHOSPHOR_DBUS_INTERFACES_LIBS)
+
+vpnor_test_create_pnor_partition_table_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_pnor_partition_table.cpp
+vpnor_test_create_pnor_partition_table_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_pnor_partition_table_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_partition_exists_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_partition_exists.cpp
+vpnor_test_create_read_window_partition_exists_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_partition_exists_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_write_patch_SOURCES = \
+ $(TEST_MBOX_VPNOR_SRCS) \
+ mtd.c \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ %reldir%/write_patch.cpp
+vpnor_test_write_patch_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_write_patch_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_write_prsv_SOURCES = \
+ $(TEST_MBOX_VPNOR_SRCS) \
+ mtd.c \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ %reldir%/write_prsv.cpp
+vpnor_test_write_prsv_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_write_prsv_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_write_ro_SOURCES = \
+ $(TEST_MBOX_VPNOR_SRCS) \
+ mtd.c \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ %reldir%/write_ro.cpp
+vpnor_test_write_ro_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_write_ro_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_write_rw_SOURCES = \
+ $(TEST_MBOX_VPNOR_SRCS) \
+ mtd.c \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ %reldir%/write_rw.cpp
+vpnor_test_write_rw_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_write_rw_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_no_name_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_no_name.cpp
+vpnor_test_toc_no_name_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_no_name_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_start_gt_end_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_start_gt_end.cpp
+vpnor_test_toc_start_gt_end_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_start_gt_end_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_no_start_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_no_start.cpp
+vpnor_test_toc_no_start_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_no_start_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_no_end_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_no_end.cpp
+vpnor_test_toc_no_end_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_no_end_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_no_version_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_no_version.cpp
+vpnor_test_toc_no_version_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_no_version_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_flags_SOURCES = \
+ common.c \
+ vpnor/pnor_partition_table.cpp \
+ %reldir%/toc_flags.cpp
+vpnor_test_toc_flags_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_flags_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_overlap_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/toc_overlap.cpp
+vpnor_test_toc_overlap_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_overlap_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_lookup_found_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/toc_lookup_found.cpp
+vpnor_test_toc_lookup_found_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_lookup_found_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_lookup_failed_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/toc_lookup_failed.cpp
+vpnor_test_toc_lookup_failed_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_lookup_failed_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_toc_missing_file_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/toc_missing_file.cpp
+vpnor_test_toc_missing_file_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_toc_missing_file_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_oob_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_oob.cpp
+vpnor_test_create_read_window_oob_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_oob_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_toc_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_toc.cpp
+vpnor_test_create_read_window_toc_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_toc_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_straddle_partitions_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_straddle_partitions.cpp
+vpnor_test_create_read_window_straddle_partitions_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_straddle_partitions_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_partition_invalid_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_partition_invalid.cpp
+vpnor_test_create_read_window_partition_invalid_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_partition_invalid_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_read_patch_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/read_patch.cpp
+vpnor_test_read_patch_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_read_patch_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_write_patch_resize_SOURCES = \
+ $(TEST_MBOX_VPNOR_SRCS) \
+ mtd.c \
+ vpnor/mboxd_pnor_partition_table.cpp \
+ vpnor/mboxd_flash.cpp \
+ vpnor/pnor_partition.cpp \
+ %reldir%/write_patch_resize.cpp
+vpnor_test_write_patch_resize_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_write_patch_resize_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_dump_flash_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/dump_flash.cpp
+vpnor_test_dump_flash_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_dump_flash_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_size_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_size.cpp
+vpnor_test_create_read_window_size_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_size_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_read_window_remap_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_read_window_remap.cpp
+vpnor_test_create_read_window_remap_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_read_window_remap_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_write_window_ro_partition_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_write_window_ro_partition.cpp
+vpnor_test_create_write_window_ro_partition_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_write_window_ro_partition_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_write_window_rw_partition_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_write_window_rw_partition.cpp
+vpnor_test_create_write_window_rw_partition_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_write_window_rw_partition_LDADD = $(VPNOR_LDADD)
+
+vpnor_test_create_write_window_unmapped_SOURCES = \
+ $(TEST_MOCK_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_write_window_unmapped.cpp
+vpnor_test_create_write_window_unmapped_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_write_window_unmapped_LDADD = $(VPNOR_LDADD)
+
+if VIRTUAL_PNOR_ENABLED
+check_PROGRAMS += \
+ %reldir%/create_pnor_partition_table \
+ %reldir%/create_read_window_partition_exists \
+ %reldir%/write_prsv \
+ %reldir%/write_ro \
+ %reldir%/write_rw \
+ %reldir%/write_patch \
+ %reldir%/toc_no_name \
+ %reldir%/toc_start_gt_end \
+ %reldir%/toc_no_start \
+ %reldir%/toc_no_end \
+ %reldir%/toc_no_version \
+ %reldir%/toc_flags \
+ %reldir%/toc_overlap \
+ %reldir%/toc_lookup_found \
+ %reldir%/toc_lookup_failed \
+ %reldir%/toc_missing_file \
+ %reldir%/create_read_window_oob \
+ %reldir%/create_read_window_toc \
+ %reldir%/create_read_window_straddle_partitions \
+ %reldir%/create_read_window_partition_invalid \
+ %reldir%/read_patch \
+ %reldir%/write_patch_resize \
+ %reldir%/dump_flash \
+ %reldir%/create_read_window_size \
+ %reldir%/create_read_window_remap \
+ %reldir%/create_write_window_ro_partition \
+ %reldir%/create_write_window_rw_partition \
+ %reldir%/create_write_window_unmapped
+
+XFAIL_TESTS += %reldir%/create_write_window_ro_partition
+XFAIL_TESTS += %reldir%/create_write_window_unmapped
+endif
diff --git a/test/vpnor/create_pnor_partition_table.cpp b/vpnor/test/create_pnor_partition_table.cpp
similarity index 98%
rename from test/vpnor/create_pnor_partition_table.cpp
rename to vpnor/test/create_pnor_partition_table.cpp
index 1c664f9..3a46e38 100644
--- a/test/vpnor/create_pnor_partition_table.cpp
+++ b/vpnor/test/create_pnor_partition_table.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static const auto BLOCK_SIZE = 4 * 1024;
static const auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/create_read_window_oob.cpp b/vpnor/test/create_read_window_oob.cpp
similarity index 97%
rename from test/vpnor/create_read_window_oob.cpp
rename to vpnor/test/create_read_window_oob.cpp
index e827b70..445b0a1 100644
--- a/test/vpnor/create_read_window_oob.cpp
+++ b/vpnor/test/create_read_window_oob.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
const std::string toc[] = {
"partition01=HBB,00001000,00002000,80,ECC,READONLY",
diff --git a/test/vpnor/create_read_window_partition_exists.cpp b/vpnor/test/create_read_window_partition_exists.cpp
similarity index 98%
rename from test/vpnor/create_read_window_partition_exists.cpp
rename to vpnor/test/create_read_window_partition_exists.cpp
index 983435f..12ac19b 100644
--- a/test/vpnor/create_read_window_partition_exists.cpp
+++ b/vpnor/test/create_read_window_partition_exists.cpp
@@ -15,7 +15,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
// A read window assumes that the toc is located at offset 0,
// so create dummy partition at arbitrary offset 0x1000.
diff --git a/test/vpnor/create_read_window_partition_invalid.cpp b/vpnor/test/create_read_window_partition_invalid.cpp
similarity index 97%
rename from test/vpnor/create_read_window_partition_invalid.cpp
rename to vpnor/test/create_read_window_partition_invalid.cpp
index 796f90b..9ed4347 100644
--- a/test/vpnor/create_read_window_partition_invalid.cpp
+++ b/vpnor/test/create_read_window_partition_invalid.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
const std::string toc[] = {
"partition01=HBB,00002000,00003000,80,ECC,READONLY",
diff --git a/test/vpnor/create_read_window_remap.cpp b/vpnor/test/create_read_window_remap.cpp
similarity index 98%
rename from test/vpnor/create_read_window_remap.cpp
rename to vpnor/test/create_read_window_remap.cpp
index dc3bb00..ea319c1 100644
--- a/test/vpnor/create_read_window_remap.cpp
+++ b/vpnor/test/create_read_window_remap.cpp
@@ -15,7 +15,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static const auto BLOCK_SIZE = 4096;
static const auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/create_read_window_size.cpp b/vpnor/test/create_read_window_size.cpp
similarity index 98%
rename from test/vpnor/create_read_window_size.cpp
rename to vpnor/test/create_read_window_size.cpp
index eb19299..1837546 100644
--- a/test/vpnor/create_read_window_size.cpp
+++ b/vpnor/test/create_read_window_size.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static const auto BLOCK_SIZE = 4096;
static const auto ERASE_SIZE = BLOCK_SIZE;
static const auto WINDOW_SIZE = 2 * BLOCK_SIZE;
diff --git a/test/vpnor/create_read_window_straddle_partitions.cpp b/vpnor/test/create_read_window_straddle_partitions.cpp
similarity index 98%
rename from test/vpnor/create_read_window_straddle_partitions.cpp
rename to vpnor/test/create_read_window_straddle_partitions.cpp
index 48b6414..e396088 100644
--- a/test/vpnor/create_read_window_straddle_partitions.cpp
+++ b/vpnor/test/create_read_window_straddle_partitions.cpp
@@ -13,7 +13,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
const std::string toc[] = {
"partition01=ONE,00001000,00002000,80,ECC,READONLY",
diff --git a/test/vpnor/create_read_window_toc.cpp b/vpnor/test/create_read_window_toc.cpp
similarity index 98%
rename from test/vpnor/create_read_window_toc.cpp
rename to vpnor/test/create_read_window_toc.cpp
index b663032..32f6523 100644
--- a/test/vpnor/create_read_window_toc.cpp
+++ b/vpnor/test/create_read_window_toc.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 4 * 1024;
static constexpr auto PNOR_SIZE = 64 * 1024 * 1024;
diff --git a/test/vpnor/create_write_window_ro_partition.cpp b/vpnor/test/create_write_window_ro_partition.cpp
similarity index 97%
rename from test/vpnor/create_write_window_ro_partition.cpp
rename to vpnor/test/create_write_window_ro_partition.cpp
index 684cd39..09dbba0 100644
--- a/test/vpnor/create_write_window_ro_partition.cpp
+++ b/vpnor/test/create_write_window_ro_partition.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
const std::string toc[] = {
"partition01=HBB,00001000,00002000,80,ECC,READONLY",
diff --git a/test/vpnor/create_write_window_rw_partition.cpp b/vpnor/test/create_write_window_rw_partition.cpp
similarity index 97%
rename from test/vpnor/create_write_window_rw_partition.cpp
rename to vpnor/test/create_write_window_rw_partition.cpp
index 38b0d7b..74b5831 100644
--- a/test/vpnor/create_write_window_rw_partition.cpp
+++ b/vpnor/test/create_write_window_rw_partition.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
const std::string toc[] = {
"partition01=HBB,00001000,00002000,80,ECC,READWRITE",
diff --git a/test/vpnor/create_write_window_unmapped.cpp b/vpnor/test/create_write_window_unmapped.cpp
similarity index 97%
rename from test/vpnor/create_write_window_unmapped.cpp
rename to vpnor/test/create_write_window_unmapped.cpp
index 27dc931..47ba57e 100644
--- a/test/vpnor/create_write_window_unmapped.cpp
+++ b/vpnor/test/create_write_window_unmapped.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/dump_flash.cpp b/vpnor/test/dump_flash.cpp
similarity index 98%
rename from test/vpnor/dump_flash.cpp
rename to vpnor/test/dump_flash.cpp
index 6757c90..e811f6f 100644
--- a/test/vpnor/dump_flash.cpp
+++ b/vpnor/test/dump_flash.cpp
@@ -13,7 +13,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
struct test_context
{
diff --git a/test/vpnor/read_patch.cpp b/vpnor/test/read_patch.cpp
similarity index 98%
rename from test/vpnor/read_patch.cpp
rename to vpnor/test/read_patch.cpp
index b1e6dbb..31a422e 100644
--- a/test/vpnor/read_patch.cpp
+++ b/vpnor/test/read_patch.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/tmpd.cpp b/vpnor/test/tmpd.cpp
similarity index 96%
rename from test/vpnor/tmpd.cpp
rename to vpnor/test/tmpd.cpp
index 9adc615..723bf56 100644
--- a/test/vpnor/tmpd.cpp
+++ b/vpnor/test/tmpd.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
namespace openpower
{
diff --git a/test/vpnor/tmpd.hpp b/vpnor/test/tmpd.hpp
similarity index 100%
rename from test/vpnor/tmpd.hpp
rename to vpnor/test/tmpd.hpp
diff --git a/test/vpnor/toc_flags.cpp b/vpnor/test/toc_flags.cpp
similarity index 100%
rename from test/vpnor/toc_flags.cpp
rename to vpnor/test/toc_flags.cpp
diff --git a/test/vpnor/toc_lookup_failed.cpp b/vpnor/test/toc_lookup_failed.cpp
similarity index 97%
rename from test/vpnor/toc_lookup_failed.cpp
rename to vpnor/test/toc_lookup_failed.cpp
index eb9be4c..199a00b 100644
--- a/test/vpnor/toc_lookup_failed.cpp
+++ b/vpnor/test/toc_lookup_failed.cpp
@@ -12,7 +12,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/toc_lookup_found.cpp b/vpnor/test/toc_lookup_found.cpp
similarity index 97%
rename from test/vpnor/toc_lookup_found.cpp
rename to vpnor/test/toc_lookup_found.cpp
index 3d5dfd0..411e3f8 100644
--- a/test/vpnor/toc_lookup_found.cpp
+++ b/vpnor/test/toc_lookup_found.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/toc_missing_file.cpp b/vpnor/test/toc_missing_file.cpp
similarity index 97%
rename from test/vpnor/toc_missing_file.cpp
rename to vpnor/test/toc_missing_file.cpp
index 2b2b423..821653f 100644
--- a/test/vpnor/toc_missing_file.cpp
+++ b/vpnor/test/toc_missing_file.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/toc_no_end.cpp b/vpnor/test/toc_no_end.cpp
similarity index 100%
rename from test/vpnor/toc_no_end.cpp
rename to vpnor/test/toc_no_end.cpp
diff --git a/test/vpnor/toc_no_name.cpp b/vpnor/test/toc_no_name.cpp
similarity index 100%
rename from test/vpnor/toc_no_name.cpp
rename to vpnor/test/toc_no_name.cpp
diff --git a/test/vpnor/toc_no_start.cpp b/vpnor/test/toc_no_start.cpp
similarity index 100%
rename from test/vpnor/toc_no_start.cpp
rename to vpnor/test/toc_no_start.cpp
diff --git a/test/vpnor/toc_no_version.cpp b/vpnor/test/toc_no_version.cpp
similarity index 100%
rename from test/vpnor/toc_no_version.cpp
rename to vpnor/test/toc_no_version.cpp
diff --git a/test/vpnor/toc_overlap.cpp b/vpnor/test/toc_overlap.cpp
similarity index 96%
rename from test/vpnor/toc_overlap.cpp
rename to vpnor/test/toc_overlap.cpp
index c87ae54..94d071c 100644
--- a/test/vpnor/toc_overlap.cpp
+++ b/vpnor/test/toc_overlap.cpp
@@ -11,7 +11,7 @@
#include "test/system.h"
}
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto ERASE_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/toc_start_gt_end.cpp b/vpnor/test/toc_start_gt_end.cpp
similarity index 100%
rename from test/vpnor/toc_start_gt_end.cpp
rename to vpnor/test/toc_start_gt_end.cpp
diff --git a/test/vpnor/write_patch.cpp b/vpnor/test/write_patch.cpp
similarity index 98%
rename from test/vpnor/write_patch.cpp
rename to vpnor/test/write_patch.cpp
index f45ab26..3b2b16a 100644
--- a/test/vpnor/write_patch.cpp
+++ b/vpnor/test/write_patch.cpp
@@ -14,7 +14,7 @@
#include "mbox.h"
#include "mboxd_flash.h"
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto DATA_SIZE = 8;
diff --git a/test/vpnor/write_patch_resize.cpp b/vpnor/test/write_patch_resize.cpp
similarity index 97%
rename from test/vpnor/write_patch_resize.cpp
rename to vpnor/test/write_patch_resize.cpp
index 350b210..8d67683 100644
--- a/test/vpnor/write_patch_resize.cpp
+++ b/vpnor/test/write_patch_resize.cpp
@@ -15,7 +15,7 @@
#include "mbox.h"
#include "mboxd_flash.h"
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
static constexpr auto PART_SIZE = BLOCK_SIZE;
diff --git a/test/vpnor/write_prsv.cpp b/vpnor/test/write_prsv.cpp
similarity index 97%
rename from test/vpnor/write_prsv.cpp
rename to vpnor/test/write_prsv.cpp
index faa05db..26f1d86 100644
--- a/test/vpnor/write_prsv.cpp
+++ b/vpnor/test/write_prsv.cpp
@@ -12,7 +12,7 @@
#include "mbox.h"
#include "mboxd_flash.h"
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
diff --git a/test/vpnor/write_ro.cpp b/vpnor/test/write_ro.cpp
similarity index 96%
rename from test/vpnor/write_ro.cpp
rename to vpnor/test/write_ro.cpp
index 504822a..53eeb18 100644
--- a/test/vpnor/write_ro.cpp
+++ b/vpnor/test/write_ro.cpp
@@ -12,7 +12,7 @@
#include "mbox.h"
#include "mboxd_flash.h"
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;
diff --git a/test/vpnor/write_rw.cpp b/vpnor/test/write_rw.cpp
similarity index 98%
rename from test/vpnor/write_rw.cpp
rename to vpnor/test/write_rw.cpp
index aba12bb..1ee5c6c 100644
--- a/test/vpnor/write_rw.cpp
+++ b/vpnor/test/write_rw.cpp
@@ -12,7 +12,7 @@
#include "mbox.h"
#include "mboxd_flash.h"
-#include "test/vpnor/tmpd.hpp"
+#include "vpnor/test/tmpd.hpp"
static constexpr auto BLOCK_SIZE = 0x1000;