third_party.pigweed.src/pw_software_update/BUILD.bazel
Ewout van Bekkum 772ec7907d pw_software_update: merge BundledUpdateManager into the service
Merges the BundledUpdateManager into the BundledUpdateService.

Also fixes up the bazel build files.

No-Docs-Update-Reason: Module still in early development
Requires: pigweed-internal:15640
Change-Id: I7061ed9ad02009a1ece92599b4900038eaefc3e7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62420
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
2021-09-27 19:44:10 +00:00

87 lines
2.2 KiB
Python

# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
load("@rules_proto//proto:defs.bzl", "proto_library")
load(
"//pw_build:pigweed.bzl",
"pw_cc_library",
"pw_cc_test",
)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
proto_library(
name = "update_bundle_proto",
srcs = [
"pw_software_update_protos/tuf.proto",
"pw_software_update_protos/update_bundle.proto",
],
strip_import_prefix = "//pw_software_update",
)
pw_cc_library(
name = "update_bundle",
srcs = ["update_bundle_accessor.cc"],
hdrs = [
"public/pw_software_update/bundled_update_backend.h",
"public/pw_software_update/config.h",
"public/pw_software_update/manifest_accessor.h",
"public/pw_software_update/update_bundle_accessor.h",
],
includes = ["public"],
deps = [
"//pw_blob_store",
"//pw_kvs",
"//pw_log",
"//pw_protobuf",
"//pw_status",
"//pw_stream",
],
)
pw_cc_library(
name = "bundled_update_service",
srcs = ["bundled_update_service.cc"],
hdrs = ["public/pw_software_update/bundled_update_service.h"],
includes = ["public"],
deps = [
":update_bundle",
":update_bundle_proto",
"//pw_log",
"//pw_result",
"//pw_status",
],
)
pw_cc_test(
name = "update_bundle_test",
srcs = ["update_bundle_test.cc"],
deps = [
":update_bundle",
"//pw_kvs:fake_flash_test_key_value_store",
"//pw_unit_test",
],
)
pw_cc_test(
name = "bundled_update_service_test",
srcs = ["bundled_update_service_test.cc"],
deps = [
":bundled_update_service",
"//pw_unit_test",
],
)