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 | |
Rob Mohr | 5fc2541 | 2021-06-23 09:35:23 -0700 | [diff] [blame] | 23 | licenses(["notice"]) |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 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", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 57 | "//pw_bytes", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 58 | "//pw_checksum", |
Wyatt Hepler | 1c329ca | 2020-02-07 18:07:23 -0800 | [diff] [blame] | 59 | "//pw_containers", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 60 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 61 | "//pw_log:facade", |
| 62 | "//pw_span", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 63 | "//pw_status", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 64 | ], |
| 65 | ) |
| 66 | |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 67 | pw_cc_library( |
| 68 | name = "crc16", |
| 69 | hdrs = [ |
| 70 | "public/pw_kvs/crc16_checksum.h", |
| 71 | ], |
| 72 | deps = [ |
| 73 | ":pw_kvs", |
| 74 | "//pw_checksum", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 75 | "//pw_span", |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 76 | ], |
| 77 | ) |
| 78 | |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 79 | pw_cc_library( |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 80 | name = "fake_flash", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 81 | srcs = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 82 | "fake_flash_memory.cc", |
Wyatt Hepler | cdd6dfc | 2020-02-18 12:04:04 -0800 | [diff] [blame] | 83 | ], |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 84 | hdrs = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 85 | "public/pw_kvs/fake_flash_memory.h", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 86 | ], |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 87 | includes = ["public"], |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 88 | deps = [ |
David Rogers | d64cc01 | 2020-05-26 12:37:37 -0700 | [diff] [blame] | 89 | ":pw_kvs", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 90 | "//pw_containers", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 91 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 92 | "//pw_log:facade", |
| 93 | "//pw_span", |
Wyatt Hepler | ad684a1 | 2020-02-04 17:17:29 -0800 | [diff] [blame] | 94 | "//pw_status", |
| 95 | ], |
| 96 | ) |
| 97 | |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 98 | pw_cc_library( |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 99 | name = "fake_flash_1_aligned_partition", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 100 | srcs = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 101 | "fake_flash_test_partition.cc", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 102 | ], |
| 103 | hdrs = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 104 | "public/pw_kvs/flash_test_partition.h", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 105 | ], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 106 | defines = [ |
| 107 | "PW_FLASH_TEST_SECTORS=6U", |
| 108 | "PW_FLASH_TEST_SECTOR_SIZE=4096U", |
| 109 | "PW_FLASH_TEST_ALIGNMENT=1U", |
| 110 | ], |
| 111 | deps = [ |
| 112 | ":fake_flash", |
| 113 | ":pw_kvs", |
| 114 | ], |
| 115 | ) |
| 116 | |
| 117 | pw_cc_library( |
| 118 | name = "fake_flash_16_aligned_partition", |
| 119 | srcs = [ |
| 120 | "fake_flash_test_partition.cc", |
| 121 | ], |
| 122 | hdrs = [ |
| 123 | "public/pw_kvs/flash_test_partition.h", |
| 124 | ], |
| 125 | defines = [ |
| 126 | "PW_FLASH_TEST_SECTORS=6U", |
| 127 | "PW_FLASH_TEST_SECTOR_SIZE=4096U", |
| 128 | "PW_FLASH_TEST_ALIGNMENT=16", |
| 129 | ], |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 130 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 131 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 132 | ":pw_kvs", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 133 | ], |
| 134 | ) |
| 135 | |
| 136 | pw_cc_library( |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 137 | name = "fake_flash_64_aligned_partition", |
| 138 | srcs = [ |
| 139 | "fake_flash_test_partition.cc", |
| 140 | ], |
| 141 | hdrs = [ |
| 142 | "public/pw_kvs/flash_test_partition.h", |
| 143 | ], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 144 | defines = [ |
| 145 | "PW_FLASH_TEST_SECTORS=6U", |
| 146 | "PW_FLASH_TEST_SECTOR_SIZE=4096U", |
| 147 | "PW_FLASH_TEST_ALIGNMENT=64U", |
| 148 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 149 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 150 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 151 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 152 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 153 | ) |
| 154 | |
| 155 | pw_cc_library( |
| 156 | name = "fake_flash_256_aligned_partition", |
| 157 | srcs = [ |
| 158 | "fake_flash_test_partition.cc", |
| 159 | ], |
| 160 | hdrs = [ |
| 161 | "public/pw_kvs/flash_test_partition.h", |
| 162 | ], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 163 | defines = [ |
| 164 | "PW_FLASH_TEST_SECTORS=6U", |
| 165 | "PW_FLASH_TEST_SECTOR_SIZE=4096U", |
| 166 | "PW_FLASH_TEST_ALIGNMENT=256U", |
| 167 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 168 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 169 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 170 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 171 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 172 | ) |
| 173 | |
| 174 | pw_cc_library( |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 175 | name = "fake_flash_test_key_value_store", |
| 176 | srcs = [ |
| 177 | "fake_flash_test_key_value_store.cc", |
| 178 | ], |
| 179 | hdrs = [ |
| 180 | "public/pw_kvs/test_key_value_store.h", |
| 181 | ], |
| 182 | deps = [ |
| 183 | ":crc16", |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 184 | ":fake_flash", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 185 | ":pw_kvs", |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 186 | ], |
| 187 | ) |
| 188 | |
| 189 | pw_cc_library( |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 190 | name = "test_partition", |
| 191 | srcs = [ |
| 192 | "flash_partition_with_stats.cc", |
| 193 | ], |
| 194 | hdrs = [ |
| 195 | "public/pw_kvs/flash_partition_with_stats.h", |
| 196 | ], |
| 197 | includes = ["public"], |
| 198 | visibility = ["//visibility:private"], |
| 199 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 200 | "//pw_containers", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 201 | "//pw_kvs", |
| 202 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 203 | "//pw_log:facade", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 204 | "//pw_status", |
| 205 | ], |
| 206 | ) |
| 207 | |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 208 | pw_cc_test( |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 209 | name = "alignment_test", |
| 210 | srcs = [ |
| 211 | "alignment_test.cc", |
| 212 | ], |
| 213 | deps = [ |
| 214 | ":pw_kvs", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 215 | "//pw_status", |
| 216 | "//pw_unit_test", |
Wyatt Hepler | 1927c28 | 2020-02-11 16:45:02 -0800 | [diff] [blame] | 217 | ], |
| 218 | ) |
| 219 | |
| 220 | pw_cc_test( |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 221 | name = "checksum_test", |
| 222 | srcs = ["checksum_test.cc"], |
| 223 | deps = [ |
| 224 | ":crc16", |
| 225 | ":pw_kvs", |
| 226 | "//pw_checksum", |
| 227 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 228 | "//pw_unit_test", |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 229 | ], |
| 230 | ) |
| 231 | |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 232 | pw_cc_test( |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 233 | name = "converts_to_span_test", |
| 234 | srcs = ["converts_to_span_test.cc"], |
| 235 | deps = [":pw_kvs"], |
| 236 | ) |
| 237 | |
| 238 | pw_cc_test( |
Wyatt Hepler | 97fc794 | 2020-02-06 15:55:45 -0800 | [diff] [blame] | 239 | name = "entry_test", |
| 240 | srcs = [ |
| 241 | "entry_test.cc", |
| 242 | ], |
| 243 | deps = [ |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 244 | ":fake_flash", |
Wyatt Hepler | 97fc794 | 2020-02-06 15:55:45 -0800 | [diff] [blame] | 245 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 246 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 247 | "//pw_span", |
| 248 | "//pw_unit_test", |
Wyatt Hepler | 97fc794 | 2020-02-06 15:55:45 -0800 | [diff] [blame] | 249 | ], |
| 250 | ) |
| 251 | |
| 252 | pw_cc_test( |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 253 | name = "entry_cache_test", |
| 254 | srcs = ["entry_cache_test.cc"], |
Wyatt Hepler | 0294627 | 2020-03-18 10:36:22 -0700 | [diff] [blame] | 255 | deps = [ |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 256 | ":fake_flash", |
Wyatt Hepler | 0294627 | 2020-03-18 10:36:22 -0700 | [diff] [blame] | 257 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 258 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 259 | "//pw_unit_test", |
Wyatt Hepler | 0294627 | 2020-03-18 10:36:22 -0700 | [diff] [blame] | 260 | ], |
Wyatt Hepler | 7ded6da | 2020-03-11 18:24:43 -0700 | [diff] [blame] | 261 | ) |
| 262 | |
| 263 | pw_cc_test( |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 264 | name = "flash_partition_1_alignment_test", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 265 | srcs = ["flash_partition_test.cc"], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 266 | defines = [ |
| 267 | "PW_FLASH_TEST_ITERATIONS=100", |
| 268 | "PW_FLASH_TEST_WRITE_SIZE=1", |
| 269 | ], |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 270 | deps = [ |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 271 | ":fake_flash_1_aligned_partition", |
| 272 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 273 | "//pw_log", |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 274 | "//pw_unit_test", |
| 275 | ], |
| 276 | ) |
| 277 | |
| 278 | pw_cc_test( |
| 279 | name = "flash_partition_16_alignment_test", |
| 280 | srcs = ["flash_partition_test.cc"], |
| 281 | defines = [ |
| 282 | "PW_FLASH_TEST_ITERATIONS=100", |
| 283 | "PW_FLASH_TEST_WRITE_SIZE=1", |
| 284 | ], |
| 285 | deps = [ |
| 286 | ":fake_flash_16_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 287 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 288 | "//pw_log", |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 289 | "//pw_unit_test", |
| 290 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 291 | ) |
| 292 | |
| 293 | pw_cc_test( |
| 294 | name = "flash_partition_64_alignment_test", |
| 295 | srcs = ["flash_partition_test.cc"], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 296 | defines = [ |
| 297 | "PW_FLASH_TEST_ITERATIONS=100", |
| 298 | "PW_FLASH_TEST_WRITE_SIZE=1", |
| 299 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 300 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 301 | ":fake_flash_64_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 302 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 303 | "//pw_log", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 304 | "//pw_unit_test", |
| 305 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 306 | ) |
| 307 | |
| 308 | pw_cc_test( |
| 309 | name = "flash_partition_256_alignment_test", |
| 310 | srcs = ["flash_partition_test.cc"], |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 311 | defines = [ |
| 312 | "PW_FLASH_TEST_ITERATIONS=100", |
| 313 | "PW_FLASH_TEST_WRITE_SIZE=1", |
| 314 | ], |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 315 | deps = [ |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 316 | ":fake_flash_256_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 317 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 318 | "//pw_log", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 319 | "//pw_unit_test", |
| 320 | ], |
David Rogers | ca59296 | 2020-07-01 09:21:54 -0700 | [diff] [blame] | 321 | ) |
| 322 | |
| 323 | pw_cc_test( |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 324 | name = "flash_partition_256_write_size_test", |
| 325 | srcs = ["flash_partition_test.cc"], |
| 326 | defines = [ |
| 327 | "PW_FLASH_TEST_ITERATIONS=100", |
| 328 | "PW_FLASH_TEST_WRITE_SIZE=256", |
| 329 | ], |
| 330 | deps = [ |
| 331 | ":fake_flash_1_aligned_partition", |
| 332 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 333 | "//pw_log", |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 334 | "//pw_unit_test", |
| 335 | ], |
| 336 | ) |
| 337 | |
| 338 | pw_cc_test( |
Rob Oliver | e64daf4 | 2020-11-24 11:50:03 -0500 | [diff] [blame] | 339 | name = "key_test", |
| 340 | srcs = [ |
| 341 | "key_test.cc", |
| 342 | ], |
| 343 | deps = [ |
| 344 | ":pw_kvs", |
| 345 | "//pw_status", |
| 346 | "//pw_unit_test", |
| 347 | ], |
| 348 | ) |
| 349 | |
| 350 | pw_cc_test( |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 351 | name = "key_value_store_test", |
| 352 | srcs = ["key_value_store_test.cc"], |
| 353 | deps = [ |
| 354 | ":crc16", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 355 | ":fake_flash", |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 356 | ":pw_kvs", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 357 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 358 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 359 | "//pw_log:facade", |
| 360 | "//pw_span", |
| 361 | "//pw_status", |
| 362 | "//pw_string", |
| 363 | "//pw_unit_test", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 364 | ], |
| 365 | ) |
| 366 | |
| 367 | pw_cc_test( |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 368 | name = "key_value_store_1_alignment_flash_test", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 369 | srcs = ["key_value_store_initialized_test.cc"], |
| 370 | deps = [ |
| 371 | ":crc16", |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 372 | ":fake_flash_1_aligned_partition", |
| 373 | ":pw_kvs", |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 374 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 375 | "//pw_log", |
David Rogers | 2d4fa78 | 2021-07-08 21:07:28 -0700 | [diff] [blame] | 376 | "//pw_log:facade", |
| 377 | "//pw_span", |
| 378 | "//pw_status", |
| 379 | "//pw_string", |
| 380 | "//pw_unit_test", |
| 381 | ], |
| 382 | ) |
| 383 | |
| 384 | pw_cc_test( |
| 385 | name = "key_value_store_16_alignment_flash_test", |
| 386 | srcs = ["key_value_store_initialized_test.cc"], |
| 387 | deps = [ |
| 388 | ":crc16", |
| 389 | ":fake_flash_16_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 390 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 391 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 392 | "//pw_log", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 393 | "//pw_log:facade", |
| 394 | "//pw_span", |
| 395 | "//pw_status", |
| 396 | "//pw_string", |
| 397 | "//pw_unit_test", |
| 398 | ], |
| 399 | ) |
| 400 | |
| 401 | pw_cc_test( |
| 402 | name = "key_value_store_64_alignment_flash_test", |
| 403 | srcs = ["key_value_store_initialized_test.cc"], |
| 404 | deps = [ |
| 405 | ":crc16", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 406 | ":fake_flash_64_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 407 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 408 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 409 | "//pw_log", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 410 | "//pw_log:facade", |
| 411 | "//pw_span", |
| 412 | "//pw_status", |
| 413 | "//pw_string", |
| 414 | "//pw_unit_test", |
| 415 | ], |
| 416 | ) |
| 417 | |
| 418 | pw_cc_test( |
| 419 | name = "key_value_store_256_alignment_flash_test", |
| 420 | srcs = ["key_value_store_initialized_test.cc"], |
| 421 | deps = [ |
| 422 | ":crc16", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 423 | ":fake_flash_256_aligned_partition", |
Wyatt Hepler | 2debeb6 | 2020-12-03 08:19:57 -0800 | [diff] [blame] | 424 | ":pw_kvs", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 425 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 426 | "//pw_log", |
David Rogers | 6a262b4 | 2020-07-09 03:27:41 -0700 | [diff] [blame] | 427 | "//pw_log:facade", |
| 428 | "//pw_span", |
| 429 | "//pw_status", |
| 430 | "//pw_string", |
| 431 | "//pw_unit_test", |
| 432 | ], |
| 433 | ) |
| 434 | |
| 435 | pw_cc_test( |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 436 | name = "fake_flash_test_key_value_store_test", |
| 437 | srcs = ["test_key_value_store_test.cc"], |
| 438 | deps = [ |
| 439 | ":crc16", |
| 440 | ":fake_flash_test_key_value_store", |
| 441 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 442 | "//pw_log", |
David Rogers | eaa2a69 | 2020-08-07 00:48:16 -0700 | [diff] [blame] | 443 | "//pw_status", |
| 444 | "//pw_unit_test", |
| 445 | ], |
| 446 | ) |
| 447 | |
| 448 | pw_cc_test( |
Wyatt Hepler | 8e94ed6 | 2020-03-05 16:45:32 -0800 | [diff] [blame] | 449 | name = "key_value_store_binary_format_test", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 450 | srcs = [ |
Wyatt Hepler | 8e94ed6 | 2020-03-05 16:45:32 -0800 | [diff] [blame] | 451 | "key_value_store_binary_format_test.cc", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 452 | ], |
| 453 | deps = [ |
| 454 | ":crc16", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 455 | ":fake_flash", |
Wyatt Hepler | 118fc3c | 2020-02-21 14:23:19 -0800 | [diff] [blame] | 456 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 457 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 458 | "//pw_unit_test", |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 459 | ], |
| 460 | ) |
| 461 | |
| 462 | pw_cc_test( |
David Rogers | 67cf06d | 2021-04-15 14:56:46 -0700 | [diff] [blame] | 463 | name = "key_value_store_put_test", |
| 464 | srcs = ["key_value_store_put_test.cc"], |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 465 | deps = [ |
| 466 | ":crc16", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 467 | ":fake_flash", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 468 | ":pw_kvs", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 469 | ":test_partition", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 470 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 471 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 472 | "//pw_unit_test", |
Wyatt Hepler | 16b0452 | 2020-02-07 16:00:14 -0800 | [diff] [blame] | 473 | ], |
| 474 | ) |
| 475 | |
| 476 | pw_cc_test( |
Wyatt Hepler | 495b6ee | 2020-02-12 18:58:01 -0800 | [diff] [blame] | 477 | name = "key_value_store_map_test", |
| 478 | srcs = ["key_value_store_map_test.cc"], |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 479 | deps = [ |
Wyatt Hepler | ec4b935 | 2020-01-31 15:51:50 -0800 | [diff] [blame] | 480 | ":crc16", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 481 | ":fake_flash", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 482 | ":pw_kvs", |
David Rogers | 5cc5ce8 | 2020-03-13 19:19:03 -0700 | [diff] [blame] | 483 | ":test_partition", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 484 | "//pw_checksum", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 485 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 486 | "//pw_log:facade", |
| 487 | "//pw_span", |
| 488 | "//pw_unit_test", |
Wyatt Hepler | 2ad6067 | 2020-01-21 08:00:16 -0800 | [diff] [blame] | 489 | ], |
| 490 | ) |
Wyatt Hepler | d621682 | 2020-02-04 16:39:15 -0800 | [diff] [blame] | 491 | |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 492 | pw_cc_test( |
| 493 | name = "sectors_test", |
| 494 | srcs = ["sectors_test.cc"], |
| 495 | deps = [ |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 496 | ":fake_flash", |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 497 | ":pw_kvs", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 498 | "//pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 499 | "//pw_unit_test", |
Wyatt Hepler | c84393f | 2020-03-20 11:23:24 -0700 | [diff] [blame] | 500 | ], |
| 501 | ) |
| 502 | |
Armando Montanez | f9e93e1 | 2020-04-22 07:44:14 -0700 | [diff] [blame] | 503 | pw_cc_test( |
| 504 | name = "key_value_store_wear_test", |
| 505 | srcs = [ |
| 506 | "key_value_store_wear_test.cc", |
| 507 | ], |
| 508 | deps = [ |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 509 | ":fake_flash", |
Armando Montanez | f9e93e1 | 2020-04-22 07:44:14 -0700 | [diff] [blame] | 510 | ":pw_kvs", |
David Rogers | d5138f3 | 2020-04-28 15:18:56 -0700 | [diff] [blame] | 511 | ":test_partition", |
Nathaniel Brough | f91e763 | 2021-07-26 17:12:14 +0800 | [diff] [blame] | 512 | "//pw_log", |
Armando Montanez | f9e93e1 | 2020-04-22 07:44:14 -0700 | [diff] [blame] | 513 | "//pw_unit_test", |
| 514 | ], |
| 515 | ) |