1# Copyright 2021 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("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21cc_library( 22 name = "pw_persistent_ram", 23 srcs = ["persistent_buffer.cc"], 24 hdrs = [ 25 "public/pw_persistent_ram/persistent.h", 26 "public/pw_persistent_ram/persistent_buffer.h", 27 ], 28 strip_include_prefix = "public", 29 deps = [ 30 "//pw_assert", 31 "//pw_bytes", 32 "//pw_checksum", 33 "//pw_stream", 34 ], 35) 36 37cc_library( 38 name = "flat_file_system_entry", 39 hdrs = [ 40 "public/pw_persistent_ram/flat_file_system_entry.h", 41 ], 42 strip_include_prefix = "public", 43 deps = [ 44 "//pw_file:flat_file_system", 45 "//pw_persistent_ram", 46 ], 47) 48 49pw_cc_test( 50 name = "persistent_test", 51 srcs = [ 52 "persistent_test.cc", 53 ], 54 # The test contains intentional uninitialized memory access. 55 tags = ["nomsan"], 56 deps = [ 57 ":pw_persistent_ram", 58 "//pw_random", 59 "//pw_unit_test", 60 ], 61) 62 63pw_cc_test( 64 name = "persistent_buffer_test", 65 srcs = [ 66 "persistent_buffer_test.cc", 67 ], 68 # The test contains intentional uninitialized memory access. 69 tags = ["nomsan"], 70 deps = [ 71 ":pw_persistent_ram", 72 "//pw_random", 73 "//pw_unit_test", 74 ], 75) 76 77pw_cc_test( 78 name = "flat_file_system_entry_test", 79 srcs = [ 80 "flat_file_system_entry_test.cc", 81 ], 82 deps = [ 83 ":flat_file_system_entry", 84 ], 85) 86