• 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_sync:borrow",
73        "//pw_unit_test",
74    ],
75)
76
77pw_cc_test(
78    name = "blob_store_chunk_write_test",
79    srcs = [
80        "blob_store_chunk_write_test.cc",
81    ],
82    deps = [
83        ":pw_blob_store",
84        "//pw_kvs:crc16",
85        "//pw_kvs:fake_flash",
86        "//pw_kvs:fake_flash_test_key_value_store",
87        "//pw_log",
88        "//pw_random",
89        "//pw_unit_test",
90    ],
91)
92
93pw_cc_test(
94    name = "blob_store_deferred_write_test",
95    srcs = [
96        "blob_store_deferred_write_test.cc",
97    ],
98    deps = [
99        ":pw_blob_store",
100        "//pw_kvs:crc16",
101        "//pw_kvs:fake_flash",
102        "//pw_kvs:fake_flash_test_key_value_store",
103        "//pw_log",
104        "//pw_random",
105        "//pw_unit_test",
106    ],
107)
108
109pw_cc_test(
110    name = "flat_file_system_entry_test",
111    srcs = ["flat_file_system_entry_test.cc"],
112    deps = [
113        ":flat_file_system_entry",
114        ":pw_blob_store",
115        "//pw_kvs:crc16",
116        "//pw_kvs:fake_flash",
117        "//pw_kvs:fake_flash_test_key_value_store",
118        "//pw_random",
119        "//pw_sync:mutex",
120    ],
121)
122