diff options
author | Xin Li <delphij@google.com> | 2024-01-17 22:13:58 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2024-01-17 22:13:58 -0800 |
commit | 28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6 (patch) | |
tree | c1643be8ab17fc607cea748a8bb1d621a5964873 /pw_kvs/BUILD.gn | |
parent | ec2628a6ba2d0ecbe3ac10c8c772f6fc6acc345d (diff) | |
parent | f054515492af5132f685cb23fe11891ee77104c9 (diff) | |
download | pigweed-temp_319669529.tar.gz |
Merge Android 24Q1 Release (ab/11220357)temp_319669529
Bug: 319669529
Merged-In: Iba357b308a79d0c8b560acd4f72b5423c9c83294
Change-Id: Icdf552029fb97a34e83c6dd7799433fc473a2506
Diffstat (limited to 'pw_kvs/BUILD.gn')
-rw-r--r-- | pw_kvs/BUILD.gn | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/pw_kvs/BUILD.gn b/pw_kvs/BUILD.gn index 907769f46..1125e6d69 100644 --- a/pw_kvs/BUILD.gn +++ b/pw_kvs/BUILD.gn @@ -120,6 +120,13 @@ pw_source_set("fake_flash") { ] } +pw_source_set("flash_partition_with_logical_sectors") { + public_configs = [ ":public_include_path" ] + public = [ "public/pw_kvs/flash_partition_with_logical_sectors.h" ] + public_deps = [ dir_pw_kvs ] + deps = [ ":config" ] +} + pw_source_set("fake_flash_12_byte_partition") { public_configs = [ ":public_include_path" ] public = [ "public/pw_kvs/flash_test_partition.h" ] @@ -200,6 +207,24 @@ pw_source_set("fake_flash_256_aligned_partition") { ] } +pw_source_set("fake_flash_1_aligned_4_logical_partition") { + public_configs = [ ":public_include_path" ] + public = [ "public/pw_kvs/flash_test_partition.h" ] + sources = [ "fake_flash_test_logical_sector_partition.cc" ] + public_deps = [ ":flash_test_partition" ] + deps = [ + ":fake_flash", + ":flash_partition_with_logical_sectors", + dir_pw_kvs, + ] + defines = [ + "PW_FLASH_TEST_SECTORS=24U", + "PW_FLASH_TEST_SECTOR_SIZE=4096U", + "PW_FLASH_TEST_ALIGNMENT=1U", + "PW_FLASH_TEST_SECTORS_PER_LOGICAL_SECTOR=4U", + ] +} + pw_source_set("fake_flash_test_key_value_store") { public_configs = [ ":public_include_path" ] sources = [ "fake_flash_test_key_value_store.cc" ] @@ -358,7 +383,7 @@ pw_test_group("tests") { if (defined(pw_toolchain_SCOPE.is_host_toolchain) && pw_toolchain_SCOPE.is_host_toolchain) { - # TODO(b/234883746): KVS tests are not compatible with device builds as they + # TODO: b/234883746 - KVS tests are not compatible with device builds as they # use features such as std::map and are computationally expensive. Solving # this requires a more complex capabilities-based build and configuration # system which allowing enabling specific tests for targets that support @@ -368,13 +393,17 @@ pw_test_group("tests") { ":entry_test", ":entry_cache_test", ":flash_partition_1_stream_test", + ":flash_partition_4_logical_stream_test", ":flash_partition_1_alignment_test", + ":flash_partition_1_alignment_4_logical_test", ":flash_partition_16_alignment_test", ":flash_partition_64_alignment_test", ":flash_partition_256_alignment_test", ":flash_partition_256_write_size_test", + ":flash_partition_4_logical_256_write_size_test", ":key_value_store_test", ":key_value_store_1_alignment_flash_test", + ":key_value_store_1_alignment_4_logical_flash_test", ":key_value_store_16_alignment_flash_test", ":key_value_store_64_alignment_flash_test", ":key_value_store_256_alignment_flash_test", @@ -437,6 +466,15 @@ pw_test("flash_partition_1_stream_test") { ] } +pw_test("flash_partition_4_logical_stream_test") { + deps = [ + ":fake_flash", + ":fake_flash_1_aligned_4_logical_partition", + ":flash_partition_stream_test", + dir_pw_log, + ] +} + pw_test("flash_partition_1_alignment_test") { deps = [ ":fake_flash", @@ -446,6 +484,15 @@ pw_test("flash_partition_1_alignment_test") { ] } +pw_test("flash_partition_1_alignment_4_logical_test") { + deps = [ + ":fake_flash", + ":fake_flash_1_aligned_4_logical_partition", + ":flash_partition_test_2_iterations", + dir_pw_log, + ] +} + pw_test("flash_partition_16_alignment_test") { deps = [ ":fake_flash", @@ -482,6 +529,15 @@ pw_test("flash_partition_256_write_size_test") { ] } +pw_test("flash_partition_4_logical_256_write_size_test") { + deps = [ + ":fake_flash", + ":fake_flash_1_aligned_4_logical_partition", + ":flash_partition_test_2_iterations_256_write", + dir_pw_log, + ] +} + pw_test("key_value_store_test") { deps = [ ":config", @@ -503,6 +559,13 @@ pw_test("key_value_store_1_alignment_flash_test") { ] } +pw_test("key_value_store_1_alignment_4_logical_flash_test") { + deps = [ + ":fake_flash_1_aligned_4_logical_partition", + ":key_value_store_initialized_test", + ] +} + pw_test("key_value_store_16_alignment_flash_test") { deps = [ ":fake_flash_16_aligned_partition", |