blob: 41359d7b838835fe3860cd161ac4198d90647032 [file] [log] [blame]
Wyatt Hepler2ad60672020-01-21 08:00:16 -08001# 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
15load(
16 "//pw_build:pigweed.bzl",
17 "pw_cc_library",
18 "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
Rob Mohr5fc25412021-06-23 09:35:23 -070023licenses(["notice"])
Wyatt Hepler2ad60672020-01-21 08:00:16 -080024
25pw_cc_library(
26 name = "pw_kvs",
27 srcs = [
Wyatt Hepler1927c282020-02-11 16:45:02 -080028 "alignment.cc",
Wyatt Hepler4da1fcb2020-01-30 17:32:18 -080029 "checksum.cc",
Wyatt Heplerd31d9702020-02-14 08:46:36 -080030 "entry.cc",
Wyatt Hepler7ded6da2020-03-11 18:24:43 -070031 "entry_cache.cc",
Wyatt Hepler4da1fcb2020-01-30 17:32:18 -080032 "flash_memory.cc",
Wyatt Hepler22d0d9f2020-03-05 14:57:11 -080033 "format.cc",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080034 "key_value_store.cc",
Wyatt Heplerbdd8e5a2020-02-20 19:27:26 -080035 "public/pw_kvs/internal/entry.h",
Wyatt Hepler7ded6da2020-03-11 18:24:43 -070036 "public/pw_kvs/internal/entry_cache.h",
Wyatt Hepler1fc11042020-02-19 17:17:51 -080037 "public/pw_kvs/internal/hash.h",
38 "public/pw_kvs/internal/key_descriptor.h",
Wyatt Hepler2454f2d2020-03-20 12:54:35 -070039 "public/pw_kvs/internal/sectors.h",
Keir Mierle0dd24a82020-02-21 16:08:59 -080040 "public/pw_kvs/internal/span_traits.h",
David Rogersca592962020-07-01 09:21:54 -070041 "pw_kvs_private/config.h",
Wyatt Heplerc84393f2020-03-20 11:23:24 -070042 "sectors.cc",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080043 ],
44 hdrs = [
Wyatt Hepler1927c282020-02-11 16:45:02 -080045 "public/pw_kvs/alignment.h",
Wyatt Hepler4da1fcb2020-01-30 17:32:18 -080046 "public/pw_kvs/checksum.h",
Wyatt Heplerec4b9352020-01-31 15:51:50 -080047 "public/pw_kvs/crc16_checksum.h",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080048 "public/pw_kvs/flash_memory.h",
Wyatt Hepler88adfe82020-02-20 19:33:27 -080049 "public/pw_kvs/format.h",
Wyatt Hepler06b1b0b2020-03-09 08:26:34 -070050 "public/pw_kvs/io.h",
Rob Olivere64daf42020-11-24 11:50:03 -050051 "public/pw_kvs/key.h",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080052 "public/pw_kvs/key_value_store.h",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080053 ],
54 includes = ["public"],
55 deps = [
David Rogersc0104462020-05-08 15:50:23 -070056 "//pw_assert",
Nathaniel Broughf91e7632021-07-26 17:12:14 +080057 "//pw_bytes",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080058 "//pw_checksum",
Wyatt Hepler1c329ca2020-02-07 18:07:23 -080059 "//pw_containers",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080060 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -070061 "//pw_log:facade",
Wyatt Hepler79525f52022-03-02 11:16:28 -080062 "//pw_polyfill",
Rob Mohr06819482020-04-06 13:25:43 -070063 "//pw_span",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080064 "//pw_status",
David Rogersb9acbb02022-02-11 14:19:55 -080065 "//pw_stream",
Wyatt Hepler2ad60672020-01-21 08:00:16 -080066 ],
67)
68
Wyatt Heplerec4b9352020-01-31 15:51:50 -080069pw_cc_library(
70 name = "crc16",
71 hdrs = [
72 "public/pw_kvs/crc16_checksum.h",
73 ],
74 deps = [
75 ":pw_kvs",
76 "//pw_checksum",
Rob Mohr06819482020-04-06 13:25:43 -070077 "//pw_span",
Wyatt Heplerec4b9352020-01-31 15:51:50 -080078 ],
79)
80
Wyatt Heplerad684a12020-02-04 17:17:29 -080081pw_cc_library(
David Rogersd64cc012020-05-26 12:37:37 -070082 name = "fake_flash",
Wyatt Heplercdd6dfc2020-02-18 12:04:04 -080083 srcs = [
David Rogersd64cc012020-05-26 12:37:37 -070084 "fake_flash_memory.cc",
Wyatt Heplercdd6dfc2020-02-18 12:04:04 -080085 ],
Wyatt Heplerad684a12020-02-04 17:17:29 -080086 hdrs = [
David Rogersd64cc012020-05-26 12:37:37 -070087 "public/pw_kvs/fake_flash_memory.h",
Wyatt Heplerad684a12020-02-04 17:17:29 -080088 ],
Nathaniel Broughf91e7632021-07-26 17:12:14 +080089 includes = ["public"],
Wyatt Heplerad684a12020-02-04 17:17:29 -080090 deps = [
David Rogersd64cc012020-05-26 12:37:37 -070091 ":pw_kvs",
Rob Mohr06819482020-04-06 13:25:43 -070092 "//pw_containers",
Wyatt Heplerad684a12020-02-04 17:17:29 -080093 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -070094 "//pw_log:facade",
95 "//pw_span",
Wyatt Heplerad684a12020-02-04 17:17:29 -080096 "//pw_status",
97 ],
98)
99
David Rogers5cc5ce82020-03-13 19:19:03 -0700100pw_cc_library(
David Rogers2d4fa782021-07-08 21:07:28 -0700101 name = "fake_flash_1_aligned_partition",
David Rogersca592962020-07-01 09:21:54 -0700102 srcs = [
David Rogers6a262b42020-07-09 03:27:41 -0700103 "fake_flash_test_partition.cc",
David Rogersca592962020-07-01 09:21:54 -0700104 ],
105 hdrs = [
David Rogers6a262b42020-07-09 03:27:41 -0700106 "public/pw_kvs/flash_test_partition.h",
David Rogersca592962020-07-01 09:21:54 -0700107 ],
David Rogers2d4fa782021-07-08 21:07:28 -0700108 defines = [
109 "PW_FLASH_TEST_SECTORS=6U",
110 "PW_FLASH_TEST_SECTOR_SIZE=4096U",
111 "PW_FLASH_TEST_ALIGNMENT=1U",
112 ],
113 deps = [
114 ":fake_flash",
115 ":pw_kvs",
116 ],
117)
118
119pw_cc_library(
120 name = "fake_flash_16_aligned_partition",
121 srcs = [
122 "fake_flash_test_partition.cc",
123 ],
124 hdrs = [
125 "public/pw_kvs/flash_test_partition.h",
126 ],
127 defines = [
128 "PW_FLASH_TEST_SECTORS=6U",
129 "PW_FLASH_TEST_SECTOR_SIZE=4096U",
130 "PW_FLASH_TEST_ALIGNMENT=16",
131 ],
David Rogersca592962020-07-01 09:21:54 -0700132 deps = [
David Rogers6a262b42020-07-09 03:27:41 -0700133 ":fake_flash",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800134 ":pw_kvs",
David Rogersca592962020-07-01 09:21:54 -0700135 ],
136)
137
138pw_cc_library(
David Rogers6a262b42020-07-09 03:27:41 -0700139 name = "fake_flash_64_aligned_partition",
140 srcs = [
141 "fake_flash_test_partition.cc",
142 ],
143 hdrs = [
144 "public/pw_kvs/flash_test_partition.h",
145 ],
David Rogers2d4fa782021-07-08 21:07:28 -0700146 defines = [
147 "PW_FLASH_TEST_SECTORS=6U",
148 "PW_FLASH_TEST_SECTOR_SIZE=4096U",
149 "PW_FLASH_TEST_ALIGNMENT=64U",
150 ],
David Rogers6a262b42020-07-09 03:27:41 -0700151 deps = [
David Rogers6a262b42020-07-09 03:27:41 -0700152 ":fake_flash",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800153 ":pw_kvs",
David Rogers6a262b42020-07-09 03:27:41 -0700154 ],
David Rogers6a262b42020-07-09 03:27:41 -0700155)
156
157pw_cc_library(
158 name = "fake_flash_256_aligned_partition",
159 srcs = [
160 "fake_flash_test_partition.cc",
161 ],
162 hdrs = [
163 "public/pw_kvs/flash_test_partition.h",
164 ],
David Rogers2d4fa782021-07-08 21:07:28 -0700165 defines = [
166 "PW_FLASH_TEST_SECTORS=6U",
167 "PW_FLASH_TEST_SECTOR_SIZE=4096U",
168 "PW_FLASH_TEST_ALIGNMENT=256U",
169 ],
David Rogers6a262b42020-07-09 03:27:41 -0700170 deps = [
David Rogers6a262b42020-07-09 03:27:41 -0700171 ":fake_flash",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800172 ":pw_kvs",
David Rogers6a262b42020-07-09 03:27:41 -0700173 ],
David Rogers6a262b42020-07-09 03:27:41 -0700174)
175
176pw_cc_library(
David Rogerseaa2a692020-08-07 00:48:16 -0700177 name = "fake_flash_test_key_value_store",
178 srcs = [
179 "fake_flash_test_key_value_store.cc",
180 ],
181 hdrs = [
182 "public/pw_kvs/test_key_value_store.h",
183 ],
184 deps = [
185 ":crc16",
David Rogerseaa2a692020-08-07 00:48:16 -0700186 ":fake_flash",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800187 ":pw_kvs",
Ewout van Bekkum1d0aa6d2021-09-22 12:38:10 -0700188 "//pw_sync:borrow",
David Rogerseaa2a692020-08-07 00:48:16 -0700189 ],
190)
191
192pw_cc_library(
David Rogers5cc5ce82020-03-13 19:19:03 -0700193 name = "test_partition",
194 srcs = [
195 "flash_partition_with_stats.cc",
196 ],
197 hdrs = [
198 "public/pw_kvs/flash_partition_with_stats.h",
199 ],
200 includes = ["public"],
201 visibility = ["//visibility:private"],
202 deps = [
Rob Mohr06819482020-04-06 13:25:43 -0700203 "//pw_containers",
David Rogers5cc5ce82020-03-13 19:19:03 -0700204 "//pw_kvs",
205 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700206 "//pw_log:facade",
David Rogers5cc5ce82020-03-13 19:19:03 -0700207 "//pw_status",
208 ],
209)
210
Wyatt Heplerec4b9352020-01-31 15:51:50 -0800211pw_cc_test(
Wyatt Hepler1927c282020-02-11 16:45:02 -0800212 name = "alignment_test",
213 srcs = [
214 "alignment_test.cc",
215 ],
216 deps = [
217 ":pw_kvs",
Rob Mohr06819482020-04-06 13:25:43 -0700218 "//pw_status",
219 "//pw_unit_test",
Wyatt Hepler1927c282020-02-11 16:45:02 -0800220 ],
221)
222
223pw_cc_test(
Wyatt Heplerec4b9352020-01-31 15:51:50 -0800224 name = "checksum_test",
225 srcs = ["checksum_test.cc"],
226 deps = [
227 ":crc16",
228 ":pw_kvs",
229 "//pw_checksum",
230 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700231 "//pw_unit_test",
Wyatt Heplerec4b9352020-01-31 15:51:50 -0800232 ],
233)
234
Wyatt Hepler2ad60672020-01-21 08:00:16 -0800235pw_cc_test(
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800236 name = "converts_to_span_test",
237 srcs = ["converts_to_span_test.cc"],
238 deps = [":pw_kvs"],
239)
240
241pw_cc_test(
Wyatt Hepler97fc7942020-02-06 15:55:45 -0800242 name = "entry_test",
243 srcs = [
244 "entry_test.cc",
245 ],
246 deps = [
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800247 ":fake_flash",
Wyatt Hepler97fc7942020-02-06 15:55:45 -0800248 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800249 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700250 "//pw_span",
251 "//pw_unit_test",
Wyatt Hepler97fc7942020-02-06 15:55:45 -0800252 ],
253)
254
255pw_cc_test(
Wyatt Hepler7ded6da2020-03-11 18:24:43 -0700256 name = "entry_cache_test",
257 srcs = ["entry_cache_test.cc"],
Wyatt Hepler02946272020-03-18 10:36:22 -0700258 deps = [
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800259 ":fake_flash",
Wyatt Hepler02946272020-03-18 10:36:22 -0700260 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800261 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700262 "//pw_unit_test",
Wyatt Hepler02946272020-03-18 10:36:22 -0700263 ],
Wyatt Hepler7ded6da2020-03-11 18:24:43 -0700264)
265
266pw_cc_test(
David Rogersb9acbb02022-02-11 14:19:55 -0800267 name = "flash_partition_stream_test",
268 srcs = ["flash_partition_stream_test.cc"],
269 deps = [
270 ":fake_flash",
271 ":pw_kvs",
272 "//pw_log",
273 "//pw_random",
274 "//pw_unit_test",
275 ],
276)
277
278pw_cc_test(
David Rogers2d4fa782021-07-08 21:07:28 -0700279 name = "flash_partition_1_alignment_test",
David Rogers6a262b42020-07-09 03:27:41 -0700280 srcs = ["flash_partition_test.cc"],
David Rogers2d4fa782021-07-08 21:07:28 -0700281 defines = [
282 "PW_FLASH_TEST_ITERATIONS=100",
283 "PW_FLASH_TEST_WRITE_SIZE=1",
284 ],
David Rogersca592962020-07-01 09:21:54 -0700285 deps = [
David Rogers2d4fa782021-07-08 21:07:28 -0700286 ":fake_flash_1_aligned_partition",
287 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800288 "//pw_log",
David Rogers2d4fa782021-07-08 21:07:28 -0700289 "//pw_unit_test",
290 ],
291)
292
293pw_cc_test(
294 name = "flash_partition_16_alignment_test",
295 srcs = ["flash_partition_test.cc"],
296 defines = [
297 "PW_FLASH_TEST_ITERATIONS=100",
298 "PW_FLASH_TEST_WRITE_SIZE=1",
299 ],
300 deps = [
301 ":fake_flash_16_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800302 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800303 "//pw_log",
David Rogersca592962020-07-01 09:21:54 -0700304 "//pw_unit_test",
305 ],
David Rogers6a262b42020-07-09 03:27:41 -0700306)
307
308pw_cc_test(
309 name = "flash_partition_64_alignment_test",
310 srcs = ["flash_partition_test.cc"],
David Rogers2d4fa782021-07-08 21:07:28 -0700311 defines = [
312 "PW_FLASH_TEST_ITERATIONS=100",
313 "PW_FLASH_TEST_WRITE_SIZE=1",
314 ],
David Rogers6a262b42020-07-09 03:27:41 -0700315 deps = [
David Rogers6a262b42020-07-09 03:27:41 -0700316 ":fake_flash_64_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800317 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800318 "//pw_log",
David Rogers6a262b42020-07-09 03:27:41 -0700319 "//pw_unit_test",
320 ],
David Rogers6a262b42020-07-09 03:27:41 -0700321)
322
323pw_cc_test(
324 name = "flash_partition_256_alignment_test",
325 srcs = ["flash_partition_test.cc"],
David Rogers2d4fa782021-07-08 21:07:28 -0700326 defines = [
327 "PW_FLASH_TEST_ITERATIONS=100",
328 "PW_FLASH_TEST_WRITE_SIZE=1",
329 ],
David Rogers6a262b42020-07-09 03:27:41 -0700330 deps = [
David Rogers6a262b42020-07-09 03:27:41 -0700331 ":fake_flash_256_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800332 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800333 "//pw_log",
David Rogers6a262b42020-07-09 03:27:41 -0700334 "//pw_unit_test",
335 ],
David Rogersca592962020-07-01 09:21:54 -0700336)
337
338pw_cc_test(
David Rogers2d4fa782021-07-08 21:07:28 -0700339 name = "flash_partition_256_write_size_test",
340 srcs = ["flash_partition_test.cc"],
341 defines = [
342 "PW_FLASH_TEST_ITERATIONS=100",
343 "PW_FLASH_TEST_WRITE_SIZE=256",
344 ],
345 deps = [
346 ":fake_flash_1_aligned_partition",
347 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800348 "//pw_log",
David Rogers2d4fa782021-07-08 21:07:28 -0700349 "//pw_unit_test",
350 ],
351)
352
353pw_cc_test(
Rob Olivere64daf42020-11-24 11:50:03 -0500354 name = "key_test",
355 srcs = [
356 "key_test.cc",
357 ],
358 deps = [
359 ":pw_kvs",
360 "//pw_status",
361 "//pw_unit_test",
362 ],
363)
364
365pw_cc_test(
Wyatt Hepler495b6ee2020-02-12 18:58:01 -0800366 name = "key_value_store_test",
367 srcs = ["key_value_store_test.cc"],
368 deps = [
369 ":crc16",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800370 ":fake_flash",
Wyatt Hepler495b6ee2020-02-12 18:58:01 -0800371 ":pw_kvs",
Rob Mohr06819482020-04-06 13:25:43 -0700372 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800373 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700374 "//pw_log:facade",
375 "//pw_span",
376 "//pw_status",
377 "//pw_string",
378 "//pw_unit_test",
Wyatt Hepler118fc3c2020-02-21 14:23:19 -0800379 ],
380)
381
382pw_cc_test(
David Rogers2d4fa782021-07-08 21:07:28 -0700383 name = "key_value_store_1_alignment_flash_test",
David Rogers6a262b42020-07-09 03:27:41 -0700384 srcs = ["key_value_store_initialized_test.cc"],
385 deps = [
386 ":crc16",
David Rogers2d4fa782021-07-08 21:07:28 -0700387 ":fake_flash_1_aligned_partition",
388 ":pw_kvs",
David Rogers2d4fa782021-07-08 21:07:28 -0700389 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800390 "//pw_log",
David Rogers2d4fa782021-07-08 21:07:28 -0700391 "//pw_log:facade",
392 "//pw_span",
393 "//pw_status",
394 "//pw_string",
395 "//pw_unit_test",
396 ],
397)
398
399pw_cc_test(
400 name = "key_value_store_16_alignment_flash_test",
401 srcs = ["key_value_store_initialized_test.cc"],
402 deps = [
403 ":crc16",
404 ":fake_flash_16_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800405 ":pw_kvs",
David Rogers6a262b42020-07-09 03:27:41 -0700406 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800407 "//pw_log",
David Rogers6a262b42020-07-09 03:27:41 -0700408 "//pw_log:facade",
409 "//pw_span",
410 "//pw_status",
411 "//pw_string",
412 "//pw_unit_test",
413 ],
414)
415
416pw_cc_test(
417 name = "key_value_store_64_alignment_flash_test",
418 srcs = ["key_value_store_initialized_test.cc"],
419 deps = [
420 ":crc16",
David Rogers6a262b42020-07-09 03:27:41 -0700421 ":fake_flash_64_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800422 ":pw_kvs",
David Rogers6a262b42020-07-09 03:27:41 -0700423 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800424 "//pw_log",
David Rogers6a262b42020-07-09 03:27:41 -0700425 "//pw_log:facade",
426 "//pw_span",
427 "//pw_status",
428 "//pw_string",
429 "//pw_unit_test",
430 ],
431)
432
433pw_cc_test(
434 name = "key_value_store_256_alignment_flash_test",
435 srcs = ["key_value_store_initialized_test.cc"],
436 deps = [
437 ":crc16",
David Rogers6a262b42020-07-09 03:27:41 -0700438 ":fake_flash_256_aligned_partition",
Wyatt Hepler2debeb62020-12-03 08:19:57 -0800439 ":pw_kvs",
David Rogers6a262b42020-07-09 03:27:41 -0700440 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800441 "//pw_log",
David Rogers6a262b42020-07-09 03:27:41 -0700442 "//pw_log:facade",
443 "//pw_span",
444 "//pw_status",
445 "//pw_string",
446 "//pw_unit_test",
447 ],
448)
449
450pw_cc_test(
David Rogerseaa2a692020-08-07 00:48:16 -0700451 name = "fake_flash_test_key_value_store_test",
452 srcs = ["test_key_value_store_test.cc"],
453 deps = [
454 ":crc16",
455 ":fake_flash_test_key_value_store",
456 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800457 "//pw_log",
David Rogerseaa2a692020-08-07 00:48:16 -0700458 "//pw_status",
Ewout van Bekkum1d0aa6d2021-09-22 12:38:10 -0700459 "//pw_sync:borrow",
David Rogerseaa2a692020-08-07 00:48:16 -0700460 "//pw_unit_test",
461 ],
462)
463
464pw_cc_test(
Wyatt Hepler8e94ed62020-03-05 16:45:32 -0800465 name = "key_value_store_binary_format_test",
Wyatt Hepler118fc3c2020-02-21 14:23:19 -0800466 srcs = [
Wyatt Hepler8e94ed62020-03-05 16:45:32 -0800467 "key_value_store_binary_format_test.cc",
Wyatt Hepler118fc3c2020-02-21 14:23:19 -0800468 ],
469 deps = [
470 ":crc16",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800471 ":fake_flash",
Wyatt Hepler118fc3c2020-02-21 14:23:19 -0800472 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800473 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700474 "//pw_unit_test",
Wyatt Hepler495b6ee2020-02-12 18:58:01 -0800475 ],
476)
477
478pw_cc_test(
David Rogers67cf06d2021-04-15 14:56:46 -0700479 name = "key_value_store_put_test",
480 srcs = ["key_value_store_put_test.cc"],
Wyatt Hepler16b04522020-02-07 16:00:14 -0800481 deps = [
482 ":crc16",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800483 ":fake_flash",
Wyatt Hepler16b04522020-02-07 16:00:14 -0800484 ":pw_kvs",
David Rogers5cc5ce82020-03-13 19:19:03 -0700485 ":test_partition",
Wyatt Hepler16b04522020-02-07 16:00:14 -0800486 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800487 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700488 "//pw_unit_test",
Wyatt Hepler16b04522020-02-07 16:00:14 -0800489 ],
490)
491
492pw_cc_test(
Wyatt Hepler495b6ee2020-02-12 18:58:01 -0800493 name = "key_value_store_map_test",
494 srcs = ["key_value_store_map_test.cc"],
Wyatt Hepler2ad60672020-01-21 08:00:16 -0800495 deps = [
Wyatt Heplerec4b9352020-01-31 15:51:50 -0800496 ":crc16",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800497 ":fake_flash",
Wyatt Hepler2ad60672020-01-21 08:00:16 -0800498 ":pw_kvs",
David Rogers5cc5ce82020-03-13 19:19:03 -0700499 ":test_partition",
Wyatt Hepler2ad60672020-01-21 08:00:16 -0800500 "//pw_checksum",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800501 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700502 "//pw_log:facade",
503 "//pw_span",
504 "//pw_unit_test",
Wyatt Hepler2ad60672020-01-21 08:00:16 -0800505 ],
506)
Wyatt Heplerd6216822020-02-04 16:39:15 -0800507
Wyatt Heplerc84393f2020-03-20 11:23:24 -0700508pw_cc_test(
509 name = "sectors_test",
510 srcs = ["sectors_test.cc"],
511 deps = [
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800512 ":fake_flash",
Wyatt Heplerc84393f2020-03-20 11:23:24 -0700513 ":pw_kvs",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800514 "//pw_log",
Rob Mohr06819482020-04-06 13:25:43 -0700515 "//pw_unit_test",
Wyatt Heplerc84393f2020-03-20 11:23:24 -0700516 ],
517)
518
Armando Montanezf9e93e12020-04-22 07:44:14 -0700519pw_cc_test(
520 name = "key_value_store_wear_test",
521 srcs = [
522 "key_value_store_wear_test.cc",
523 ],
524 deps = [
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800525 ":fake_flash",
Armando Montanezf9e93e12020-04-22 07:44:14 -0700526 ":pw_kvs",
David Rogersd5138f32020-04-28 15:18:56 -0700527 ":test_partition",
Nathaniel Broughf91e7632021-07-26 17:12:14 +0800528 "//pw_log",
Armando Montanezf9e93e12020-04-22 07:44:14 -0700529 "//pw_unit_test",
530 ],
531)