• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load(
16    "//pw_build:pigweed.bzl",
17    "pw_cc_library",
18    "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25pw_cc_library(
26    name = "pw_blob_store",
27    srcs = ["blob_store.cc"],
28    hdrs = [
29        "public/pw_blob_store/blob_store.h",
30        "public/pw_blob_store/internal/metadata_format.h",
31    ],
32    includes = ["public"],
33    deps = [
34        "//pw_bytes",
35        "//pw_checksum",
36        "//pw_containers",
37        "//pw_kvs",
38        "//pw_log",
39        "//pw_preprocessor",
40        "//pw_span",
41        "//pw_status",
42        "//pw_stream",
43        "//pw_sync:borrow",
44    ],
45)
46
47pw_cc_library(
48    name = "flat_file_system_entry",
49    srcs = ["flat_file_system_entry.cc"],
50    hdrs = ["public/pw_blob_store/flat_file_system_entry.h"],
51    includes = ["public"],
52    deps = [
53        ":pw_blob_store",
54        "//pw_bytes",
55        "//pw_file:flat_file_system",
56        "//pw_status",
57        "//pw_sync:mutex",
58    ],
59)
60
61pw_cc_test(
62    name = "blob_store_test",
63    srcs = [
64        "blob_store_test.cc",
65    ],
66    deps = [
67        ":pw_blob_store",
68        "//pw_kvs:crc16",
69        "//pw_kvs:fake_flash",
70        "//pw_kvs:fake_flash_test_key_value_store",
71        "//pw_log",
72        "//pw_random",
73        "//pw_sync:borrow",
74        "//pw_unit_test",
75    ],
76)
77
78pw_cc_test(
79    name = "blob_store_chunk_write_test",
80    srcs = [
81        "blob_store_chunk_write_test.cc",
82    ],
83    deps = [
84        ":pw_blob_store",
85        "//pw_kvs:crc16",
86        "//pw_kvs:fake_flash",
87        "//pw_kvs:fake_flash_test_key_value_store",
88        "//pw_log",
89        "//pw_random",
90        "//pw_unit_test",
91    ],
92)
93
94pw_cc_test(
95    name = "blob_store_deferred_write_test",
96    srcs = [
97        "blob_store_deferred_write_test.cc",
98    ],
99    deps = [
100        ":pw_blob_store",
101        "//pw_kvs:crc16",
102        "//pw_kvs:fake_flash",
103        "//pw_kvs:fake_flash_test_key_value_store",
104        "//pw_log",
105        "//pw_random",
106        "//pw_unit_test",
107    ],
108)
109
110pw_cc_test(
111    name = "flat_file_system_entry_test",
112    srcs = ["flat_file_system_entry_test.cc"],
113    deps = [
114        ":flat_file_system_entry",
115        ":pw_blob_store",
116        "//pw_kvs:crc16",
117        "//pw_kvs:fake_flash",
118        "//pw_kvs:fake_flash_test_key_value_store",
119        "//pw_random",
120        "//pw_sync:mutex",
121    ],
122)
123