1*61c4878aSAndroid Build Coastguard Worker# Copyright 2020 The Pigweed Authors 2*61c4878aSAndroid Build Coastguard Worker# 3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of 5*61c4878aSAndroid Build Coastguard Worker# the License at 6*61c4878aSAndroid Build Coastguard Worker# 7*61c4878aSAndroid Build Coastguard Worker# https://www.apache.org/licenses/LICENSE-2.0 8*61c4878aSAndroid Build Coastguard Worker# 9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under 13*61c4878aSAndroid Build Coastguard Worker# the License. 14*61c4878aSAndroid Build Coastguard Worker 15*61c4878aSAndroid Build Coastguard Workerload("//pw_build:compatibility.bzl", "incompatible_with_mcu") 16*61c4878aSAndroid Build Coastguard Workerload("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 17*61c4878aSAndroid Build Coastguard Worker 18*61c4878aSAndroid Build Coastguard Workerpackage(default_visibility = ["//visibility:public"]) 19*61c4878aSAndroid Build Coastguard Worker 20*61c4878aSAndroid Build Coastguard Workerlicenses(["notice"]) 21*61c4878aSAndroid Build Coastguard Worker 22*61c4878aSAndroid Build Coastguard Workercc_library( 23*61c4878aSAndroid Build Coastguard Worker name = "pw_kvs", 24*61c4878aSAndroid Build Coastguard Worker srcs = [ 25*61c4878aSAndroid Build Coastguard Worker "alignment.cc", 26*61c4878aSAndroid Build Coastguard Worker "checksum.cc", 27*61c4878aSAndroid Build Coastguard Worker "entry.cc", 28*61c4878aSAndroid Build Coastguard Worker "entry_cache.cc", 29*61c4878aSAndroid Build Coastguard Worker "flash_memory.cc", 30*61c4878aSAndroid Build Coastguard Worker "format.cc", 31*61c4878aSAndroid Build Coastguard Worker "key_value_store.cc", 32*61c4878aSAndroid Build Coastguard Worker "pw_kvs_private/config.h", 33*61c4878aSAndroid Build Coastguard Worker "sectors.cc", 34*61c4878aSAndroid Build Coastguard Worker ], 35*61c4878aSAndroid Build Coastguard Worker hdrs = [ 36*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/alignment.h", 37*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/checksum.h", 38*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/crc16_checksum.h", 39*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_memory.h", 40*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/format.h", 41*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/entry.h", 42*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/entry_cache.h", 43*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/hash.h", 44*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/key_descriptor.h", 45*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/sectors.h", 46*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/internal/span_traits.h", 47*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/io.h", 48*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/key_value_store.h", 49*61c4878aSAndroid Build Coastguard Worker ], 50*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 51*61c4878aSAndroid Build Coastguard Worker deps = [ 52*61c4878aSAndroid Build Coastguard Worker ":config_override", 53*61c4878aSAndroid Build Coastguard Worker "//pw_assert", 54*61c4878aSAndroid Build Coastguard Worker "//pw_bytes", 55*61c4878aSAndroid Build Coastguard Worker "//pw_bytes:alignment", 56*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 57*61c4878aSAndroid Build Coastguard Worker "//pw_containers", 58*61c4878aSAndroid Build Coastguard Worker "//pw_log", 59*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 60*61c4878aSAndroid Build Coastguard Worker "//pw_polyfill", 61*61c4878aSAndroid Build Coastguard Worker "//pw_span", 62*61c4878aSAndroid Build Coastguard Worker "//pw_status", 63*61c4878aSAndroid Build Coastguard Worker "//pw_stream", 64*61c4878aSAndroid Build Coastguard Worker ], 65*61c4878aSAndroid Build Coastguard Worker) 66*61c4878aSAndroid Build Coastguard Worker 67*61c4878aSAndroid Build Coastguard Workerlabel_flag( 68*61c4878aSAndroid Build Coastguard Worker name = "config_override", 69*61c4878aSAndroid Build Coastguard Worker build_setting_default = "//pw_build:default_module_config", 70*61c4878aSAndroid Build Coastguard Worker) 71*61c4878aSAndroid Build Coastguard Worker 72*61c4878aSAndroid Build Coastguard Workercc_library( 73*61c4878aSAndroid Build Coastguard Worker name = "crc16", 74*61c4878aSAndroid Build Coastguard Worker hdrs = [ 75*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/crc16_checksum.h", 76*61c4878aSAndroid Build Coastguard Worker ], 77*61c4878aSAndroid Build Coastguard Worker deps = [ 78*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 79*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 80*61c4878aSAndroid Build Coastguard Worker "//pw_span", 81*61c4878aSAndroid Build Coastguard Worker ], 82*61c4878aSAndroid Build Coastguard Worker) 83*61c4878aSAndroid Build Coastguard Worker 84*61c4878aSAndroid Build Coastguard Workercc_library( 85*61c4878aSAndroid Build Coastguard Worker name = "flash_test_partition", 86*61c4878aSAndroid Build Coastguard Worker hdrs = ["public/pw_kvs/flash_test_partition.h"], 87*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 88*61c4878aSAndroid Build Coastguard Worker deps = [":pw_kvs"], 89*61c4878aSAndroid Build Coastguard Worker) 90*61c4878aSAndroid Build Coastguard Worker 91*61c4878aSAndroid Build Coastguard Workercc_library( 92*61c4878aSAndroid Build Coastguard Worker name = "test_key_value_store", 93*61c4878aSAndroid Build Coastguard Worker hdrs = ["public/pw_kvs/test_key_value_store.h"], 94*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 95*61c4878aSAndroid Build Coastguard Worker deps = [ 96*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 97*61c4878aSAndroid Build Coastguard Worker "//pw_sync:borrow", 98*61c4878aSAndroid Build Coastguard Worker ], 99*61c4878aSAndroid Build Coastguard Worker) 100*61c4878aSAndroid Build Coastguard Worker 101*61c4878aSAndroid Build Coastguard Workercc_library( 102*61c4878aSAndroid Build Coastguard Worker name = "fake_flash", 103*61c4878aSAndroid Build Coastguard Worker srcs = [ 104*61c4878aSAndroid Build Coastguard Worker "fake_flash_memory.cc", 105*61c4878aSAndroid Build Coastguard Worker ], 106*61c4878aSAndroid Build Coastguard Worker hdrs = [ 107*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/fake_flash_memory.h", 108*61c4878aSAndroid Build Coastguard Worker ], 109*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 110*61c4878aSAndroid Build Coastguard Worker deps = [ 111*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 112*61c4878aSAndroid Build Coastguard Worker "//pw_containers", 113*61c4878aSAndroid Build Coastguard Worker "//pw_log", 114*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 115*61c4878aSAndroid Build Coastguard Worker "//pw_span", 116*61c4878aSAndroid Build Coastguard Worker "//pw_status", 117*61c4878aSAndroid Build Coastguard Worker ], 118*61c4878aSAndroid Build Coastguard Worker) 119*61c4878aSAndroid Build Coastguard Worker 120*61c4878aSAndroid Build Coastguard Workercc_library( 121*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_with_logical_sectors", 122*61c4878aSAndroid Build Coastguard Worker hdrs = [ 123*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_partition_with_logical_sectors.h", 124*61c4878aSAndroid Build Coastguard Worker ], 125*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 126*61c4878aSAndroid Build Coastguard Worker deps = [ 127*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 128*61c4878aSAndroid Build Coastguard Worker ], 129*61c4878aSAndroid Build Coastguard Worker) 130*61c4878aSAndroid Build Coastguard Worker 131*61c4878aSAndroid Build Coastguard Workercc_library( 132*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_1_aligned_partition", 133*61c4878aSAndroid Build Coastguard Worker srcs = [ 134*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_partition.cc", 135*61c4878aSAndroid Build Coastguard Worker ], 136*61c4878aSAndroid Build Coastguard Worker hdrs = [ 137*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_test_partition.h", 138*61c4878aSAndroid Build Coastguard Worker ], 139*61c4878aSAndroid Build Coastguard Worker defines = [ 140*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=6U", 141*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4096U", 142*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=1U", 143*61c4878aSAndroid Build Coastguard Worker ], 144*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 145*61c4878aSAndroid Build Coastguard Worker deps = [ 146*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 147*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 148*61c4878aSAndroid Build Coastguard Worker ], 149*61c4878aSAndroid Build Coastguard Worker) 150*61c4878aSAndroid Build Coastguard Worker 151*61c4878aSAndroid Build Coastguard Workercc_library( 152*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_1_aligned_4_logical_partition", 153*61c4878aSAndroid Build Coastguard Worker srcs = [ 154*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_logical_sector_partition.cc", 155*61c4878aSAndroid Build Coastguard Worker ], 156*61c4878aSAndroid Build Coastguard Worker hdrs = [ 157*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_test_partition.h", 158*61c4878aSAndroid Build Coastguard Worker ], 159*61c4878aSAndroid Build Coastguard Worker defines = [ 160*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=24U", 161*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4096U", 162*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=1U", 163*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS_PER_LOGICAL_SECTOR=4U", 164*61c4878aSAndroid Build Coastguard Worker ], 165*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 166*61c4878aSAndroid Build Coastguard Worker deps = [ 167*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 168*61c4878aSAndroid Build Coastguard Worker ":flash_partition_with_logical_sectors", 169*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 170*61c4878aSAndroid Build Coastguard Worker ], 171*61c4878aSAndroid Build Coastguard Worker) 172*61c4878aSAndroid Build Coastguard Worker 173*61c4878aSAndroid Build Coastguard Workercc_library( 174*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_12_byte_partition", 175*61c4878aSAndroid Build Coastguard Worker srcs = ["fake_flash_test_partition.cc"], 176*61c4878aSAndroid Build Coastguard Worker hdrs = ["public/pw_kvs/flash_test_partition.h"], 177*61c4878aSAndroid Build Coastguard Worker defines = [ 178*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=3", 179*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4", 180*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=4", 181*61c4878aSAndroid Build Coastguard Worker ], 182*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 183*61c4878aSAndroid Build Coastguard Worker deps = [ 184*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 185*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 186*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 187*61c4878aSAndroid Build Coastguard Worker ], 188*61c4878aSAndroid Build Coastguard Worker) 189*61c4878aSAndroid Build Coastguard Worker 190*61c4878aSAndroid Build Coastguard Workercc_library( 191*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_16_aligned_partition", 192*61c4878aSAndroid Build Coastguard Worker srcs = [ 193*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_partition.cc", 194*61c4878aSAndroid Build Coastguard Worker ], 195*61c4878aSAndroid Build Coastguard Worker hdrs = [ 196*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_test_partition.h", 197*61c4878aSAndroid Build Coastguard Worker ], 198*61c4878aSAndroid Build Coastguard Worker defines = [ 199*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=6U", 200*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4096U", 201*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=16", 202*61c4878aSAndroid Build Coastguard Worker ], 203*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 204*61c4878aSAndroid Build Coastguard Worker deps = [ 205*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 206*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 207*61c4878aSAndroid Build Coastguard Worker ], 208*61c4878aSAndroid Build Coastguard Worker) 209*61c4878aSAndroid Build Coastguard Worker 210*61c4878aSAndroid Build Coastguard Workercc_library( 211*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_64_aligned_partition", 212*61c4878aSAndroid Build Coastguard Worker srcs = [ 213*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_partition.cc", 214*61c4878aSAndroid Build Coastguard Worker ], 215*61c4878aSAndroid Build Coastguard Worker hdrs = [ 216*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_test_partition.h", 217*61c4878aSAndroid Build Coastguard Worker ], 218*61c4878aSAndroid Build Coastguard Worker defines = [ 219*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=6U", 220*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4096U", 221*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=64U", 222*61c4878aSAndroid Build Coastguard Worker ], 223*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 224*61c4878aSAndroid Build Coastguard Worker deps = [ 225*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 226*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 227*61c4878aSAndroid Build Coastguard Worker ], 228*61c4878aSAndroid Build Coastguard Worker) 229*61c4878aSAndroid Build Coastguard Worker 230*61c4878aSAndroid Build Coastguard Workercc_library( 231*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_256_aligned_partition", 232*61c4878aSAndroid Build Coastguard Worker srcs = [ 233*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_partition.cc", 234*61c4878aSAndroid Build Coastguard Worker ], 235*61c4878aSAndroid Build Coastguard Worker hdrs = [ 236*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_test_partition.h", 237*61c4878aSAndroid Build Coastguard Worker ], 238*61c4878aSAndroid Build Coastguard Worker defines = [ 239*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTORS=6U", 240*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_SECTOR_SIZE=4096U", 241*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ALIGNMENT=256U", 242*61c4878aSAndroid Build Coastguard Worker ], 243*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 244*61c4878aSAndroid Build Coastguard Worker deps = [ 245*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 246*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 247*61c4878aSAndroid Build Coastguard Worker ], 248*61c4878aSAndroid Build Coastguard Worker) 249*61c4878aSAndroid Build Coastguard Worker 250*61c4878aSAndroid Build Coastguard Workercc_library( 251*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_test_key_value_store", 252*61c4878aSAndroid Build Coastguard Worker srcs = [ 253*61c4878aSAndroid Build Coastguard Worker "fake_flash_test_key_value_store.cc", 254*61c4878aSAndroid Build Coastguard Worker ], 255*61c4878aSAndroid Build Coastguard Worker hdrs = [ 256*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/test_key_value_store.h", 257*61c4878aSAndroid Build Coastguard Worker ], 258*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 259*61c4878aSAndroid Build Coastguard Worker deps = [ 260*61c4878aSAndroid Build Coastguard Worker ":crc16", 261*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 262*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 263*61c4878aSAndroid Build Coastguard Worker "//pw_sync:borrow", 264*61c4878aSAndroid Build Coastguard Worker ], 265*61c4878aSAndroid Build Coastguard Worker) 266*61c4878aSAndroid Build Coastguard Worker 267*61c4878aSAndroid Build Coastguard Workercc_library( 268*61c4878aSAndroid Build Coastguard Worker name = "test_partition", 269*61c4878aSAndroid Build Coastguard Worker srcs = [ 270*61c4878aSAndroid Build Coastguard Worker "flash_partition_with_stats.cc", 271*61c4878aSAndroid Build Coastguard Worker ], 272*61c4878aSAndroid Build Coastguard Worker hdrs = [ 273*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/flash_partition_with_stats.h", 274*61c4878aSAndroid Build Coastguard Worker ], 275*61c4878aSAndroid Build Coastguard Worker strip_include_prefix = "public", 276*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 277*61c4878aSAndroid Build Coastguard Worker visibility = ["//visibility:private"], 278*61c4878aSAndroid Build Coastguard Worker deps = [ 279*61c4878aSAndroid Build Coastguard Worker "//pw_containers", 280*61c4878aSAndroid Build Coastguard Worker "//pw_kvs", 281*61c4878aSAndroid Build Coastguard Worker "//pw_log", 282*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 283*61c4878aSAndroid Build Coastguard Worker "//pw_status", 284*61c4878aSAndroid Build Coastguard Worker ], 285*61c4878aSAndroid Build Coastguard Worker) 286*61c4878aSAndroid Build Coastguard Worker 287*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 288*61c4878aSAndroid Build Coastguard Worker name = "alignment_test", 289*61c4878aSAndroid Build Coastguard Worker srcs = [ 290*61c4878aSAndroid Build Coastguard Worker "alignment_test.cc", 291*61c4878aSAndroid Build Coastguard Worker ], 292*61c4878aSAndroid Build Coastguard Worker deps = [ 293*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 294*61c4878aSAndroid Build Coastguard Worker "//pw_status", 295*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 296*61c4878aSAndroid Build Coastguard Worker ], 297*61c4878aSAndroid Build Coastguard Worker) 298*61c4878aSAndroid Build Coastguard Worker 299*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 300*61c4878aSAndroid Build Coastguard Worker name = "checksum_test", 301*61c4878aSAndroid Build Coastguard Worker srcs = ["checksum_test.cc"], 302*61c4878aSAndroid Build Coastguard Worker deps = [ 303*61c4878aSAndroid Build Coastguard Worker ":crc16", 304*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 305*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 306*61c4878aSAndroid Build Coastguard Worker "//pw_log", 307*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 308*61c4878aSAndroid Build Coastguard Worker ], 309*61c4878aSAndroid Build Coastguard Worker) 310*61c4878aSAndroid Build Coastguard Worker 311*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 312*61c4878aSAndroid Build Coastguard Worker name = "converts_to_span_test", 313*61c4878aSAndroid Build Coastguard Worker srcs = ["converts_to_span_test.cc"], 314*61c4878aSAndroid Build Coastguard Worker deps = [":pw_kvs"], 315*61c4878aSAndroid Build Coastguard Worker) 316*61c4878aSAndroid Build Coastguard Worker 317*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 318*61c4878aSAndroid Build Coastguard Worker name = "entry_test", 319*61c4878aSAndroid Build Coastguard Worker srcs = [ 320*61c4878aSAndroid Build Coastguard Worker "entry_test.cc", 321*61c4878aSAndroid Build Coastguard Worker ], 322*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 323*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 324*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 325*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 326*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 327*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 328*61c4878aSAndroid Build Coastguard Worker deps = [ 329*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 330*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 331*61c4878aSAndroid Build Coastguard Worker "//pw_log", 332*61c4878aSAndroid Build Coastguard Worker "//pw_span", 333*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 334*61c4878aSAndroid Build Coastguard Worker ], 335*61c4878aSAndroid Build Coastguard Worker) 336*61c4878aSAndroid Build Coastguard Worker 337*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 338*61c4878aSAndroid Build Coastguard Worker name = "entry_cache_test", 339*61c4878aSAndroid Build Coastguard Worker srcs = ["entry_cache_test.cc"], 340*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 341*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 342*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 343*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 344*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 345*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 346*61c4878aSAndroid Build Coastguard Worker deps = [ 347*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 348*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 349*61c4878aSAndroid Build Coastguard Worker "//pw_log", 350*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 351*61c4878aSAndroid Build Coastguard Worker ], 352*61c4878aSAndroid Build Coastguard Worker) 353*61c4878aSAndroid Build Coastguard Worker 354*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 355*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_stream_test", 356*61c4878aSAndroid Build Coastguard Worker srcs = ["flash_partition_stream_test.cc"], 357*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 358*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 359*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 360*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 361*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 362*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 363*61c4878aSAndroid Build Coastguard Worker deps = [ 364*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 365*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 366*61c4878aSAndroid Build Coastguard Worker "//pw_log", 367*61c4878aSAndroid Build Coastguard Worker "//pw_random", 368*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 369*61c4878aSAndroid Build Coastguard Worker ], 370*61c4878aSAndroid Build Coastguard Worker) 371*61c4878aSAndroid Build Coastguard Worker 372*61c4878aSAndroid Build Coastguard Workercc_library( 373*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_test_100_iterations", 374*61c4878aSAndroid Build Coastguard Worker testonly = True, 375*61c4878aSAndroid Build Coastguard Worker srcs = ["flash_partition_test.cc"], 376*61c4878aSAndroid Build Coastguard Worker defines = [ 377*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ITERATIONS=100", 378*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_WRITE_SIZE=1", 379*61c4878aSAndroid Build Coastguard Worker ], 380*61c4878aSAndroid Build Coastguard Worker deps = [ 381*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 382*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 383*61c4878aSAndroid Build Coastguard Worker "//pw_log", 384*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 385*61c4878aSAndroid Build Coastguard Worker ], 386*61c4878aSAndroid Build Coastguard Worker) 387*61c4878aSAndroid Build Coastguard Worker 388*61c4878aSAndroid Build Coastguard Workercc_library( 389*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_test_2_iterations", 390*61c4878aSAndroid Build Coastguard Worker testonly = True, 391*61c4878aSAndroid Build Coastguard Worker srcs = ["flash_partition_test.cc"], 392*61c4878aSAndroid Build Coastguard Worker defines = [ 393*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ITERATIONS=2", 394*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_WRITE_SIZE=1", 395*61c4878aSAndroid Build Coastguard Worker ], 396*61c4878aSAndroid Build Coastguard Worker deps = [ 397*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 398*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 399*61c4878aSAndroid Build Coastguard Worker "//pw_log", 400*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 401*61c4878aSAndroid Build Coastguard Worker ], 402*61c4878aSAndroid Build Coastguard Worker) 403*61c4878aSAndroid Build Coastguard Worker 404*61c4878aSAndroid Build Coastguard Workercc_library( 405*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_test_100_iterations_256_write", 406*61c4878aSAndroid Build Coastguard Worker testonly = True, 407*61c4878aSAndroid Build Coastguard Worker srcs = ["flash_partition_test.cc"], 408*61c4878aSAndroid Build Coastguard Worker defines = [ 409*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ITERATIONS=100", 410*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_WRITE_SIZE=256", 411*61c4878aSAndroid Build Coastguard Worker ], 412*61c4878aSAndroid Build Coastguard Worker deps = [ 413*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 414*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 415*61c4878aSAndroid Build Coastguard Worker "//pw_log", 416*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 417*61c4878aSAndroid Build Coastguard Worker ], 418*61c4878aSAndroid Build Coastguard Worker) 419*61c4878aSAndroid Build Coastguard Worker 420*61c4878aSAndroid Build Coastguard Workercc_library( 421*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_test_2_iterations_256_write", 422*61c4878aSAndroid Build Coastguard Worker testonly = True, 423*61c4878aSAndroid Build Coastguard Worker srcs = ["flash_partition_test.cc"], 424*61c4878aSAndroid Build Coastguard Worker defines = [ 425*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_ITERATIONS=2", 426*61c4878aSAndroid Build Coastguard Worker "PW_FLASH_TEST_WRITE_SIZE=256", 427*61c4878aSAndroid Build Coastguard Worker ], 428*61c4878aSAndroid Build Coastguard Worker deps = [ 429*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 430*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 431*61c4878aSAndroid Build Coastguard Worker "//pw_log", 432*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 433*61c4878aSAndroid Build Coastguard Worker ], 434*61c4878aSAndroid Build Coastguard Worker) 435*61c4878aSAndroid Build Coastguard Worker 436*61c4878aSAndroid Build Coastguard Workercc_library( 437*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_initialized_test", 438*61c4878aSAndroid Build Coastguard Worker testonly = True, 439*61c4878aSAndroid Build Coastguard Worker srcs = ["key_value_store_initialized_test.cc"], 440*61c4878aSAndroid Build Coastguard Worker deps = [ 441*61c4878aSAndroid Build Coastguard Worker ":crc16", 442*61c4878aSAndroid Build Coastguard Worker ":flash_test_partition", 443*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 444*61c4878aSAndroid Build Coastguard Worker "//pw_bytes", 445*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 446*61c4878aSAndroid Build Coastguard Worker "//pw_log", 447*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 448*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 449*61c4878aSAndroid Build Coastguard Worker ], 450*61c4878aSAndroid Build Coastguard Worker) 451*61c4878aSAndroid Build Coastguard Worker 452*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 453*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_1_alignment_test", 454*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 455*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 456*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 457*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 458*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 459*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 460*61c4878aSAndroid Build Coastguard Worker deps = [ 461*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_partition", 462*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_100_iterations", 463*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 464*61c4878aSAndroid Build Coastguard Worker "//pw_log", 465*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 466*61c4878aSAndroid Build Coastguard Worker ], 467*61c4878aSAndroid Build Coastguard Worker) 468*61c4878aSAndroid Build Coastguard Worker 469*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 470*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_1_alignment_4_logical_test", 471*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 472*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 473*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 474*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 475*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 476*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 477*61c4878aSAndroid Build Coastguard Worker deps = [ 478*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_4_logical_partition", 479*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_2_iterations", 480*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 481*61c4878aSAndroid Build Coastguard Worker "//pw_log", 482*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 483*61c4878aSAndroid Build Coastguard Worker ], 484*61c4878aSAndroid Build Coastguard Worker) 485*61c4878aSAndroid Build Coastguard Worker 486*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 487*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_16_alignment_test", 488*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 489*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 490*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 491*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 492*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 493*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 494*61c4878aSAndroid Build Coastguard Worker deps = [ 495*61c4878aSAndroid Build Coastguard Worker ":fake_flash_16_aligned_partition", 496*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_100_iterations", 497*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 498*61c4878aSAndroid Build Coastguard Worker "//pw_log", 499*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 500*61c4878aSAndroid Build Coastguard Worker ], 501*61c4878aSAndroid Build Coastguard Worker) 502*61c4878aSAndroid Build Coastguard Worker 503*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 504*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_64_alignment_test", 505*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 506*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 507*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 508*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 509*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 510*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 511*61c4878aSAndroid Build Coastguard Worker deps = [ 512*61c4878aSAndroid Build Coastguard Worker ":fake_flash_64_aligned_partition", 513*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_100_iterations", 514*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 515*61c4878aSAndroid Build Coastguard Worker "//pw_log", 516*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 517*61c4878aSAndroid Build Coastguard Worker ], 518*61c4878aSAndroid Build Coastguard Worker) 519*61c4878aSAndroid Build Coastguard Worker 520*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 521*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_256_alignment_test", 522*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 523*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 524*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 525*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 526*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 527*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 528*61c4878aSAndroid Build Coastguard Worker deps = [ 529*61c4878aSAndroid Build Coastguard Worker ":fake_flash_256_aligned_partition", 530*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_100_iterations", 531*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 532*61c4878aSAndroid Build Coastguard Worker "//pw_log", 533*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 534*61c4878aSAndroid Build Coastguard Worker ], 535*61c4878aSAndroid Build Coastguard Worker) 536*61c4878aSAndroid Build Coastguard Worker 537*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 538*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_256_write_size_test", 539*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 540*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 541*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 542*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 543*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 544*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 545*61c4878aSAndroid Build Coastguard Worker deps = [ 546*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_partition", 547*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_100_iterations_256_write", 548*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 549*61c4878aSAndroid Build Coastguard Worker "//pw_log", 550*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 551*61c4878aSAndroid Build Coastguard Worker ], 552*61c4878aSAndroid Build Coastguard Worker) 553*61c4878aSAndroid Build Coastguard Worker 554*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 555*61c4878aSAndroid Build Coastguard Worker name = "flash_partition_4_logical_256_write_size_test", 556*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 557*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 558*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 559*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 560*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 561*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 562*61c4878aSAndroid Build Coastguard Worker deps = [ 563*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_4_logical_partition", 564*61c4878aSAndroid Build Coastguard Worker ":flash_partition_test_2_iterations_256_write", 565*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 566*61c4878aSAndroid Build Coastguard Worker "//pw_log", 567*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 568*61c4878aSAndroid Build Coastguard Worker ], 569*61c4878aSAndroid Build Coastguard Worker) 570*61c4878aSAndroid Build Coastguard Worker 571*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 572*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_test", 573*61c4878aSAndroid Build Coastguard Worker srcs = ["key_value_store_test.cc"], 574*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 575*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 576*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 577*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 578*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 579*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 580*61c4878aSAndroid Build Coastguard Worker deps = [ 581*61c4878aSAndroid Build Coastguard Worker ":crc16", 582*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 583*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 584*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 585*61c4878aSAndroid Build Coastguard Worker "//pw_log", 586*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 587*61c4878aSAndroid Build Coastguard Worker "//pw_span", 588*61c4878aSAndroid Build Coastguard Worker "//pw_status", 589*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 590*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 591*61c4878aSAndroid Build Coastguard Worker ], 592*61c4878aSAndroid Build Coastguard Worker) 593*61c4878aSAndroid Build Coastguard Worker 594*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 595*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_1_alignment_flash_test", 596*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 597*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 598*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 599*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 600*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 601*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 602*61c4878aSAndroid Build Coastguard Worker deps = [ 603*61c4878aSAndroid Build Coastguard Worker ":crc16", 604*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_partition", 605*61c4878aSAndroid Build Coastguard Worker ":key_value_store_initialized_test", 606*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 607*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 608*61c4878aSAndroid Build Coastguard Worker "//pw_log", 609*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 610*61c4878aSAndroid Build Coastguard Worker "//pw_span", 611*61c4878aSAndroid Build Coastguard Worker "//pw_status", 612*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 613*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 614*61c4878aSAndroid Build Coastguard Worker ], 615*61c4878aSAndroid Build Coastguard Worker) 616*61c4878aSAndroid Build Coastguard Worker 617*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 618*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_1_alignment_4_logical_flash_test", 619*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 620*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 621*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 622*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 623*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 624*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 625*61c4878aSAndroid Build Coastguard Worker deps = [ 626*61c4878aSAndroid Build Coastguard Worker ":crc16", 627*61c4878aSAndroid Build Coastguard Worker ":fake_flash_1_aligned_4_logical_partition", 628*61c4878aSAndroid Build Coastguard Worker ":key_value_store_initialized_test", 629*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 630*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 631*61c4878aSAndroid Build Coastguard Worker "//pw_log", 632*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 633*61c4878aSAndroid Build Coastguard Worker "//pw_span", 634*61c4878aSAndroid Build Coastguard Worker "//pw_status", 635*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 636*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 637*61c4878aSAndroid Build Coastguard Worker ], 638*61c4878aSAndroid Build Coastguard Worker) 639*61c4878aSAndroid Build Coastguard Worker 640*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 641*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_16_alignment_flash_test", 642*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 643*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 644*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 645*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 646*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 647*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 648*61c4878aSAndroid Build Coastguard Worker deps = [ 649*61c4878aSAndroid Build Coastguard Worker ":crc16", 650*61c4878aSAndroid Build Coastguard Worker ":fake_flash_16_aligned_partition", 651*61c4878aSAndroid Build Coastguard Worker ":key_value_store_initialized_test", 652*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 653*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 654*61c4878aSAndroid Build Coastguard Worker "//pw_log", 655*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 656*61c4878aSAndroid Build Coastguard Worker "//pw_span", 657*61c4878aSAndroid Build Coastguard Worker "//pw_status", 658*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 659*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 660*61c4878aSAndroid Build Coastguard Worker ], 661*61c4878aSAndroid Build Coastguard Worker) 662*61c4878aSAndroid Build Coastguard Worker 663*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 664*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_64_alignment_flash_test", 665*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 666*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 667*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 668*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 669*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 670*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 671*61c4878aSAndroid Build Coastguard Worker deps = [ 672*61c4878aSAndroid Build Coastguard Worker ":crc16", 673*61c4878aSAndroid Build Coastguard Worker ":fake_flash_64_aligned_partition", 674*61c4878aSAndroid Build Coastguard Worker ":key_value_store_initialized_test", 675*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 676*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 677*61c4878aSAndroid Build Coastguard Worker "//pw_log", 678*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 679*61c4878aSAndroid Build Coastguard Worker "//pw_span", 680*61c4878aSAndroid Build Coastguard Worker "//pw_status", 681*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 682*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 683*61c4878aSAndroid Build Coastguard Worker ], 684*61c4878aSAndroid Build Coastguard Worker) 685*61c4878aSAndroid Build Coastguard Worker 686*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 687*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_256_alignment_flash_test", 688*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 689*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 690*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 691*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 692*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 693*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 694*61c4878aSAndroid Build Coastguard Worker deps = [ 695*61c4878aSAndroid Build Coastguard Worker ":crc16", 696*61c4878aSAndroid Build Coastguard Worker ":fake_flash_256_aligned_partition", 697*61c4878aSAndroid Build Coastguard Worker ":key_value_store_initialized_test", 698*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 699*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 700*61c4878aSAndroid Build Coastguard Worker "//pw_log", 701*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 702*61c4878aSAndroid Build Coastguard Worker "//pw_span", 703*61c4878aSAndroid Build Coastguard Worker "//pw_status", 704*61c4878aSAndroid Build Coastguard Worker "//pw_string:builder", 705*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 706*61c4878aSAndroid Build Coastguard Worker ], 707*61c4878aSAndroid Build Coastguard Worker) 708*61c4878aSAndroid Build Coastguard Worker 709*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 710*61c4878aSAndroid Build Coastguard Worker name = "fake_flash_test_key_value_store_test", 711*61c4878aSAndroid Build Coastguard Worker srcs = ["test_key_value_store_test.cc"], 712*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 713*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 714*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 715*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 716*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 717*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 718*61c4878aSAndroid Build Coastguard Worker deps = [ 719*61c4878aSAndroid Build Coastguard Worker ":crc16", 720*61c4878aSAndroid Build Coastguard Worker ":fake_flash_test_key_value_store", 721*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 722*61c4878aSAndroid Build Coastguard Worker "//pw_log", 723*61c4878aSAndroid Build Coastguard Worker "//pw_status", 724*61c4878aSAndroid Build Coastguard Worker "//pw_sync:borrow", 725*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 726*61c4878aSAndroid Build Coastguard Worker ], 727*61c4878aSAndroid Build Coastguard Worker) 728*61c4878aSAndroid Build Coastguard Worker 729*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 730*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_binary_format_test", 731*61c4878aSAndroid Build Coastguard Worker srcs = [ 732*61c4878aSAndroid Build Coastguard Worker "key_value_store_binary_format_test.cc", 733*61c4878aSAndroid Build Coastguard Worker ], 734*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 735*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 736*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 737*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 738*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 739*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 740*61c4878aSAndroid Build Coastguard Worker deps = [ 741*61c4878aSAndroid Build Coastguard Worker ":crc16", 742*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 743*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 744*61c4878aSAndroid Build Coastguard Worker "//pw_log", 745*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 746*61c4878aSAndroid Build Coastguard Worker ], 747*61c4878aSAndroid Build Coastguard Worker) 748*61c4878aSAndroid Build Coastguard Worker 749*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 750*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_put_test", 751*61c4878aSAndroid Build Coastguard Worker srcs = ["key_value_store_put_test.cc"], 752*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 753*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 754*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 755*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 756*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 757*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 758*61c4878aSAndroid Build Coastguard Worker deps = [ 759*61c4878aSAndroid Build Coastguard Worker ":crc16", 760*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 761*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 762*61c4878aSAndroid Build Coastguard Worker ":test_partition", 763*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 764*61c4878aSAndroid Build Coastguard Worker "//pw_log", 765*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 766*61c4878aSAndroid Build Coastguard Worker ], 767*61c4878aSAndroid Build Coastguard Worker) 768*61c4878aSAndroid Build Coastguard Worker 769*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 770*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_map_test", 771*61c4878aSAndroid Build Coastguard Worker srcs = ["key_value_store_map_test.cc"], 772*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 773*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 774*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 775*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 776*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 777*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 778*61c4878aSAndroid Build Coastguard Worker deps = [ 779*61c4878aSAndroid Build Coastguard Worker ":crc16", 780*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 781*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 782*61c4878aSAndroid Build Coastguard Worker ":test_partition", 783*61c4878aSAndroid Build Coastguard Worker "//pw_checksum", 784*61c4878aSAndroid Build Coastguard Worker "//pw_log", 785*61c4878aSAndroid Build Coastguard Worker "//pw_log:pw_log.facade", 786*61c4878aSAndroid Build Coastguard Worker "//pw_span", 787*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 788*61c4878aSAndroid Build Coastguard Worker ], 789*61c4878aSAndroid Build Coastguard Worker) 790*61c4878aSAndroid Build Coastguard Worker 791*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 792*61c4878aSAndroid Build Coastguard Worker name = "sectors_test", 793*61c4878aSAndroid Build Coastguard Worker srcs = ["sectors_test.cc"], 794*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 795*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 796*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 797*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 798*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 799*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 800*61c4878aSAndroid Build Coastguard Worker deps = [ 801*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 802*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 803*61c4878aSAndroid Build Coastguard Worker "//pw_log", 804*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 805*61c4878aSAndroid Build Coastguard Worker ], 806*61c4878aSAndroid Build Coastguard Worker) 807*61c4878aSAndroid Build Coastguard Worker 808*61c4878aSAndroid Build Coastguard Workerpw_cc_test( 809*61c4878aSAndroid Build Coastguard Worker name = "key_value_store_wear_test", 810*61c4878aSAndroid Build Coastguard Worker srcs = [ 811*61c4878aSAndroid Build Coastguard Worker "key_value_store_wear_test.cc", 812*61c4878aSAndroid Build Coastguard Worker ], 813*61c4878aSAndroid Build Coastguard Worker # TODO: b/234883746 - KVS tests are not compatible with device builds as they 814*61c4878aSAndroid Build Coastguard Worker # use features such as std::map and are computationally expensive. Solving 815*61c4878aSAndroid Build Coastguard Worker # this requires a more complex capabilities-based build and configuration 816*61c4878aSAndroid Build Coastguard Worker # system which allowing enabling specific tests for targets that support 817*61c4878aSAndroid Build Coastguard Worker # them and modifying test parameters for different targets. 818*61c4878aSAndroid Build Coastguard Worker target_compatible_with = incompatible_with_mcu(), 819*61c4878aSAndroid Build Coastguard Worker deps = [ 820*61c4878aSAndroid Build Coastguard Worker ":fake_flash", 821*61c4878aSAndroid Build Coastguard Worker ":pw_kvs", 822*61c4878aSAndroid Build Coastguard Worker ":test_partition", 823*61c4878aSAndroid Build Coastguard Worker "//pw_log", 824*61c4878aSAndroid Build Coastguard Worker "//pw_unit_test", 825*61c4878aSAndroid Build Coastguard Worker ], 826*61c4878aSAndroid Build Coastguard Worker) 827*61c4878aSAndroid Build Coastguard Worker 828*61c4878aSAndroid Build Coastguard Workerfilegroup( 829*61c4878aSAndroid Build Coastguard Worker name = "doxygen", 830*61c4878aSAndroid Build Coastguard Worker srcs = [ 831*61c4878aSAndroid Build Coastguard Worker "public/pw_kvs/key_value_store.h", 832*61c4878aSAndroid Build Coastguard Worker "pw_kvs_private/config.h", 833*61c4878aSAndroid Build Coastguard Worker ], 834*61c4878aSAndroid Build Coastguard Worker) 835