Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 1 | # Copyright 2020 The Pigweed Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | |
| 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
| 17 | "pw_cc_library", |
| 18 | "pw_cc_test", |
| 19 | ) |
| 20 | |
| 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) # Apache License 2.0 |
| 24 | |
| 25 | pw_cc_library( |
| 26 | name = "pw_kvs", |
| 27 | srcs = [ |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 28 | "alignment.cc", |
Wyatt Hepler | 4da1fcb | 2020-01-30 17:32:18 -0800 | [diff] [blame] | 29 | "checksum.cc", |
Wyatt Hepler | d31d970 | 2020-02-14 08:46:36 -0800 | [diff] [blame] | 30 | "entry.cc", |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 31 | "entry_cache.cc", |
Wyatt Hepler | 4da1fcb | 2020-01-30 17:32:18 -0800 | [diff] [blame] | 32 | "flash_memory.cc", |
Wyatt Hepler | 22d0d9f | 2020-03-05 14:57:11 -0800 | [diff] [blame] | 33 | "format.cc", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 34 | "key_value_store.cc", |
Wyatt Hepler | bdd8e5a | 2020-02-20 19:27:26 -0800 | [diff] [blame] | 35 | "public/pw_kvs/internal/entry.h", |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 36 | "public/pw_kvs/internal/entry_cache.h", |
Wyatt Hepler | 1fc1104 | 2020-02-19 17:17:51 -0800 | [diff] [blame] | 37 | "public/pw_kvs/internal/hash.h", |
| 38 | "public/pw_kvs/internal/key_descriptor.h", |
Wyatt Hepler | 2454f2d | 2020-03-20 12:54:35 -0700 | [diff] [blame] | 39 | "public/pw_kvs/internal/sectors.h", |
Keir Mierle | 0dd24a8 | 2020-02-21 16:08:59 -0800 | [diff] [blame] | 40 | "public/pw_kvs/internal/span_traits.h", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 41 | "pw_kvs_private/config.h", |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 42 | "sectors.cc", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 43 | ], |
| 44 | hdrs = [ |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 45 | "public/pw_kvs/alignment.h", |
Wyatt Hepler | 4da1fcb | 2020-01-30 17:32:18 -0800 | [diff] [blame] | 46 | "public/pw_kvs/checksum.h", |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 47 | "public/pw_kvs/crc16_checksum.h", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 48 | "public/pw_kvs/flash_memory.h", |
Wyatt Hepler | 88adfe8 | 2020-02-20 19:33:27 -0800 | [diff] [blame] | 49 | "public/pw_kvs/format.h", |
Wyatt Hepler | 06b1b0b | 2020-03-09 08:26:34 -0700 | [diff] [blame] | 50 | "public/pw_kvs/io.h", |
Rob Oliver | e64daf4 | 2020-11-24 11:50:03 -0500 | [diff] [blame] | 51 | "public/pw_kvs/key.h", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 52 | "public/pw_kvs/key_value_store.h", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 53 | ], |
| 54 | includes = ["public"], |
| 55 | deps = [ |
David Rogers | c010446 | 2020-05-08 15:50:23 -0700 | [diff] [blame] | 56 | "//pw_assert", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 57 | "//pw_checksum", |
Wyatt Hepler | 1c329ca | 2020-02-07 18:07:23 -0800 | [diff] [blame] | 58 | "//pw_containers", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 59 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 60 | "//pw_log:facade", |
| 61 | "//pw_span", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 62 | "//pw_status", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 63 | ], |
| 64 | ) |
| 65 | |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 66 | pw_cc_library( |
| 67 | name = "crc16", |
| 68 | hdrs = [ |
| 69 | "public/pw_kvs/crc16_checksum.h", |
| 70 | ], |
| 71 | deps = [ |
| 72 | ":pw_kvs", |
| 73 | "//pw_checksum", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 74 | "//pw_span", |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 75 | ], |
| 76 | ) |
| 77 | |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 78 | pw_cc_library( |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 79 | name = "fake_flash", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 80 | srcs = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 81 | "fake_flash_memory.cc", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 82 | ], |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 83 | hdrs = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 84 | "public/pw_kvs/fake_flash_memory.h", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 85 | ], |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 86 | deps = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 87 | ":pw_kvs", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 88 | "//pw_containers", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 89 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 90 | "//pw_log:facade", |
| 91 | "//pw_span", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 92 | "//pw_status", |
| 93 | ], |
| 94 | ) |
| 95 | |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 96 | pw_cc_library( |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 97 | name = "fake_flash_small_partition", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 98 | srcs = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 99 | "fake_flash_test_partition.cc", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 100 | ], |
| 101 | hdrs = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 102 | "public/pw_kvs/flash_test_partition.h", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 103 | ], |
| 104 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 105 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 106 | ":pw_kvs", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 107 | ], |
| 108 | ) |
| 109 | |
| 110 | pw_cc_library( |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 111 | name = "fake_flash_64_aligned_partition", |
| 112 | srcs = [ |
| 113 | "fake_flash_test_partition.cc", |
| 114 | ], |
| 115 | hdrs = [ |
| 116 | "public/pw_kvs/flash_test_partition.h", |
| 117 | ], |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 118 | defines = ["PW_FLASH_TEST_ALIGNMENT=64"], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 119 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 120 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 121 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 122 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 123 | ) |
| 124 | |
| 125 | pw_cc_library( |
| 126 | name = "fake_flash_256_aligned_partition", |
| 127 | srcs = [ |
| 128 | "fake_flash_test_partition.cc", |
| 129 | ], |
| 130 | hdrs = [ |
| 131 | "public/pw_kvs/flash_test_partition.h", |
| 132 | ], |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 133 | defines = ["PW_FLASH_TEST_ALIGNMENT=256"], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 134 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 135 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 136 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 137 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 138 | ) |
| 139 | |
| 140 | pw_cc_library( |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 141 | name = "fake_flash_test_key_value_store", |
| 142 | srcs = [ |
| 143 | "fake_flash_test_key_value_store.cc", |
| 144 | ], |
| 145 | hdrs = [ |
| 146 | "public/pw_kvs/test_key_value_store.h", |
| 147 | ], |
| 148 | deps = [ |
| 149 | ":crc16", |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 150 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 151 | ":pw_kvs", |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 152 | ], |
| 153 | ) |
| 154 | |
| 155 | pw_cc_library( |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 156 | name = "test_utils", |
| 157 | hdrs = [ |
| 158 | "pw_kvs_private/byte_utils.h", |
| 159 | ], |
| 160 | includes = ["public"], |
| 161 | visibility = ["//visibility:private"], |
| 162 | ) |
| 163 | |
| 164 | pw_cc_library( |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 165 | name = "test_partition", |
| 166 | srcs = [ |
| 167 | "flash_partition_with_stats.cc", |
| 168 | ], |
| 169 | hdrs = [ |
| 170 | "public/pw_kvs/flash_partition_with_stats.h", |
| 171 | ], |
| 172 | includes = ["public"], |
| 173 | visibility = ["//visibility:private"], |
| 174 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 175 | "//pw_containers", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 176 | "//pw_kvs", |
| 177 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 178 | "//pw_log:facade", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 179 | "//pw_status", |
| 180 | ], |
| 181 | ) |
| 182 | |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 183 | pw_cc_test( |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 184 | name = "alignment_test", |
| 185 | srcs = [ |
| 186 | "alignment_test.cc", |
| 187 | ], |
| 188 | deps = [ |
| 189 | ":pw_kvs", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 190 | "//pw_status", |
| 191 | "//pw_unit_test", |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 192 | ], |
| 193 | ) |
| 194 | |
| 195 | pw_cc_test( |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 196 | name = "checksum_test", |
| 197 | srcs = ["checksum_test.cc"], |
| 198 | deps = [ |
| 199 | ":crc16", |
| 200 | ":pw_kvs", |
| 201 | "//pw_checksum", |
| 202 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 203 | "//pw_unit_test", |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 204 | ], |
| 205 | ) |
| 206 | |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 207 | pw_cc_test( |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 208 | name = "converts_to_span_test", |
| 209 | srcs = ["converts_to_span_test.cc"], |
| 210 | deps = [":pw_kvs"], |
| 211 | ) |
| 212 | |
| 213 | pw_cc_test( |
Wyatt Hepler | 97fc794 | 2020-02-06 15:55:45 -0800 | [diff] [blame] | 214 | name = "entry_test", |
| 215 | srcs = [ |
| 216 | "entry_test.cc", |
| 217 | ], |
| 218 | deps = [ |
| 219 | ":pw_kvs", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 220 | ":test_utils", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 221 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 222 | "//pw_span", |
| 223 | "//pw_unit_test", |
Wyatt Hepler | 97fc794 | 2020-02-06 15:55:45 -0800 | [diff] [blame] | 224 | ], |
| 225 | ) |
| 226 | |
| 227 | pw_cc_test( |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 228 | name = "entry_cache_test", |
| 229 | srcs = ["entry_cache_test.cc"], |
Wyatt Hepler | 0294627 | 2020-03-18 10:36:22 -0700 | [diff] [blame] | 230 | deps = [ |
| 231 | ":pw_kvs", |
| 232 | ":test_utils", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 233 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 234 | "//pw_unit_test", |
Wyatt Hepler | 0294627 | 2020-03-18 10:36:22 -0700 | [diff] [blame] | 235 | ], |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 236 | ) |
| 237 | |
| 238 | pw_cc_test( |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 239 | name = "flash_partition_small_test", |
| 240 | srcs = ["flash_partition_test.cc"], |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 241 | defines = ["PW_FLASH_TEST_ITERATIONS=100"], |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 242 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 243 | ":fake_flash_small_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 244 | ":pw_kvs", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 245 | "//pw_log:backend", |
| 246 | "//pw_unit_test", |
| 247 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 248 | ) |
| 249 | |
| 250 | pw_cc_test( |
| 251 | name = "flash_partition_64_alignment_test", |
| 252 | srcs = ["flash_partition_test.cc"], |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 253 | defines = ["PW_FLASH_TEST_ITERATIONS=100"], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 254 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 255 | ":fake_flash_64_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 256 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 257 | "//pw_log:backend", |
| 258 | "//pw_unit_test", |
| 259 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 260 | ) |
| 261 | |
| 262 | pw_cc_test( |
| 263 | name = "flash_partition_256_alignment_test", |
| 264 | srcs = ["flash_partition_test.cc"], |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 265 | defines = ["PW_FLASH_TEST_ITERATIONS=100"], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 266 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 267 | ":fake_flash_256_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 268 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 269 | "//pw_log:backend", |
| 270 | "//pw_unit_test", |
| 271 | ], |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 272 | ) |
| 273 | |
| 274 | pw_cc_test( |
Rob Oliver | e64daf4 | 2020-11-24 11:50:03 -0500 | [diff] [blame] | 275 | name = "key_test", |
| 276 | srcs = [ |
| 277 | "key_test.cc", |
| 278 | ], |
| 279 | deps = [ |
| 280 | ":pw_kvs", |
| 281 | "//pw_status", |
| 282 | "//pw_unit_test", |
| 283 | ], |
| 284 | ) |
| 285 | |
| 286 | pw_cc_test( |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 287 | name = "key_value_store_test", |
| 288 | srcs = ["key_value_store_test.cc"], |
| 289 | deps = [ |
| 290 | ":crc16", |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 291 | ":pw_kvs", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 292 | ":test_utils", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 293 | "//pw_checksum", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 294 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 295 | "//pw_log:facade", |
| 296 | "//pw_span", |
| 297 | "//pw_status", |
| 298 | "//pw_string", |
| 299 | "//pw_unit_test", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 300 | ], |
| 301 | ) |
| 302 | |
| 303 | pw_cc_test( |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 304 | name = "key_value_store_small_flash_test", |
| 305 | srcs = ["key_value_store_initialized_test.cc"], |
| 306 | deps = [ |
| 307 | ":crc16", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 308 | ":fake_flash_small_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 309 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 310 | ":test_utils", |
| 311 | "//pw_checksum", |
| 312 | "//pw_log:backend", |
| 313 | "//pw_log:facade", |
| 314 | "//pw_span", |
| 315 | "//pw_status", |
| 316 | "//pw_string", |
| 317 | "//pw_unit_test", |
| 318 | ], |
| 319 | ) |
| 320 | |
| 321 | pw_cc_test( |
| 322 | name = "key_value_store_64_alignment_flash_test", |
| 323 | srcs = ["key_value_store_initialized_test.cc"], |
| 324 | deps = [ |
| 325 | ":crc16", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 326 | ":fake_flash_64_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 327 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 328 | ":test_utils", |
| 329 | "//pw_checksum", |
| 330 | "//pw_log:backend", |
| 331 | "//pw_log:facade", |
| 332 | "//pw_span", |
| 333 | "//pw_status", |
| 334 | "//pw_string", |
| 335 | "//pw_unit_test", |
| 336 | ], |
| 337 | ) |
| 338 | |
| 339 | pw_cc_test( |
| 340 | name = "key_value_store_256_alignment_flash_test", |
| 341 | srcs = ["key_value_store_initialized_test.cc"], |
| 342 | deps = [ |
| 343 | ":crc16", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 344 | ":fake_flash_256_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 345 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 346 | ":test_utils", |
| 347 | "//pw_checksum", |
| 348 | "//pw_log:backend", |
| 349 | "//pw_log:facade", |
| 350 | "//pw_span", |
| 351 | "//pw_status", |
| 352 | "//pw_string", |
| 353 | "//pw_unit_test", |
| 354 | ], |
| 355 | ) |
| 356 | |
| 357 | pw_cc_test( |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 358 | name = "fake_flash_test_key_value_store_test", |
| 359 | srcs = ["test_key_value_store_test.cc"], |
| 360 | deps = [ |
| 361 | ":crc16", |
| 362 | ":fake_flash_test_key_value_store", |
| 363 | ":pw_kvs", |
| 364 | "//pw_log:backend", |
| 365 | "//pw_status", |
| 366 | "//pw_unit_test", |
| 367 | ], |
| 368 | ) |
| 369 | |
| 370 | pw_cc_test( |
Wyatt Hepler | 8e94ed6 | 2020-03-05 16:45:32 -0800 | [diff] [blame] | 371 | name = "key_value_store_binary_format_test", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 372 | srcs = [ |
Wyatt Hepler | 8e94ed6 | 2020-03-05 16:45:32 -0800 | [diff] [blame] | 373 | "key_value_store_binary_format_test.cc", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 374 | ], |
| 375 | deps = [ |
| 376 | ":crc16", |
| 377 | ":pw_kvs", |
| 378 | ":test_utils", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 379 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 380 | "//pw_unit_test", |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 381 | ], |
| 382 | ) |
| 383 | |
| 384 | pw_cc_test( |
David Rogers | 67cf06d | 2021-04-15 14:56:46 -0700 | [diff] [blame] | 385 | name = "key_value_store_put_test", |
| 386 | srcs = ["key_value_store_put_test.cc"], |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 387 | deps = [ |
| 388 | ":crc16", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 389 | ":pw_kvs", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 390 | ":test_partition", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 391 | ":test_utils", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 392 | "//pw_checksum", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 393 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 394 | "//pw_unit_test", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 395 | ], |
| 396 | ) |
| 397 | |
| 398 | pw_cc_test( |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 399 | name = "key_value_store_map_test", |
| 400 | srcs = ["key_value_store_map_test.cc"], |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 401 | deps = [ |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 402 | ":crc16", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 403 | ":pw_kvs", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 404 | ":test_partition", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 405 | ":test_utils", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 406 | "//pw_checksum", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 407 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 408 | "//pw_log:facade", |
| 409 | "//pw_span", |
| 410 | "//pw_unit_test", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 411 | ], |
| 412 | ) |
Wyatt Hepler | d621682 | 2020-02-04 16:39:15 -0800 | [diff] [blame] | 413 | |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 414 | pw_cc_test( |
| 415 | name = "sectors_test", |
| 416 | srcs = ["sectors_test.cc"], |
| 417 | deps = [ |
| 418 | ":pw_kvs", |
| 419 | ":test_utils", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 420 | "//pw_log:backend", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 421 | "//pw_unit_test", |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 422 | ], |
| 423 | ) |
| 424 | |
Armando Montanez | f9e93e1 | 2020-04-22 07:44:14 -0700 | [diff] [blame] | 425 | pw_cc_test( |
| 426 | name = "key_value_store_wear_test", |
| 427 | srcs = [ |
| 428 | "key_value_store_wear_test.cc", |
| 429 | ], |
| 430 | deps = [ |
| 431 | ":pw_kvs", |
David Rogers | d5138f3 | 2020-04-28 15:18:56 -0700 | [diff] [blame] | 432 | ":test_partition", |
Armando Montanez | f9e93e1 | 2020-04-22 07:44:14 -0700 | [diff] [blame] | 433 | ":test_utils", |
| 434 | "//pw_log:backend", |
| 435 | "//pw_unit_test", |
| 436 | ], |
| 437 | ) |