Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 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 | |
| 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
| 17 | "pw_cc_library", |
| 18 | "pw_cc_test", |
| 19 | ) |
| 20 | |
| 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) # Apache License 2.0 |
| 24 | |
| 25 | pw_cc_library( |
| 26 | name = "method", |
| 27 | srcs = [ |
| 28 | "raw_method.cc", |
| 29 | ], |
| 30 | hdrs = [ |
| 31 | "public/pw_rpc/internal/raw_method.h", |
| 32 | ], |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 33 | includes = ["public"], |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 34 | deps = [ |
| 35 | "//pw_bytes", |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 36 | "//pw_rpc:internal_packet_pwpb", |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 37 | "//pw_rpc:server", |
Wyatt Hepler | e95bd72 | 2020-11-23 07:49:47 -0800 | [diff] [blame] | 38 | ], |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 39 | ) |
| 40 | |
Alexei Frolov | a4d7150 | 2020-10-14 12:43:14 -0700 | [diff] [blame] | 41 | pw_cc_library( |
| 42 | name = "method_union", |
| 43 | hdrs = [ |
| 44 | "public/pw_rpc/internal/raw_method_union.h", |
| 45 | ], |
| 46 | deps = [ |
| 47 | ":method", |
Alexei Frolov | 8f553de | 2020-11-02 15:48:02 -0800 | [diff] [blame] | 48 | ], |
Alexei Frolov | 8f553de | 2020-11-02 15:48:02 -0800 | [diff] [blame] | 49 | ) |
| 50 | |
| 51 | pw_cc_library( |
| 52 | name = "test_method_context", |
| 53 | hdrs = [ |
| 54 | "public/pw_rpc/raw_test_method_context.h", |
| 55 | ], |
| 56 | deps = [ |
| 57 | ":method_union", |
| 58 | "//pw_assert", |
| 59 | "//pw_containers", |
Wyatt Hepler | e95bd72 | 2020-11-23 07:49:47 -0800 | [diff] [blame] | 60 | ], |
Alexei Frolov | 8f553de | 2020-11-02 15:48:02 -0800 | [diff] [blame] | 61 | ) |
| 62 | |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 63 | pw_cc_test( |
Alexei Frolov | c912ea7 | 2020-10-26 08:43:27 -0700 | [diff] [blame] | 64 | name = "codegen_test", |
| 65 | srcs = [ |
| 66 | "codegen_test.cc", |
| 67 | ], |
| 68 | deps = [ |
| 69 | ":method_union", |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 70 | ":test_method_context", |
Alexei Frolov | c912ea7 | 2020-10-26 08:43:27 -0700 | [diff] [blame] | 71 | "//pw_protobuf", |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 72 | "//pw_rpc:pw_rpc_test_pwpb", |
Alexei Frolov | c912ea7 | 2020-10-26 08:43:27 -0700 | [diff] [blame] | 73 | ], |
| 74 | ) |
| 75 | |
| 76 | pw_cc_test( |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 77 | name = "raw_method_test", |
| 78 | srcs = [ |
| 79 | "raw_method_test.cc", |
| 80 | ], |
| 81 | deps = [ |
Alexei Frolov | a4d7150 | 2020-10-14 12:43:14 -0700 | [diff] [blame] | 82 | ":method_union", |
| 83 | "//pw_protobuf", |
| 84 | "//pw_rpc:internal_test_utils", |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 85 | "//pw_rpc:pw_rpc_test_pwpb", |
Alexei Frolov | a4d7150 | 2020-10-14 12:43:14 -0700 | [diff] [blame] | 86 | ], |
| 87 | ) |
| 88 | |
| 89 | pw_cc_test( |
| 90 | name = "raw_method_union_test", |
| 91 | srcs = [ |
| 92 | "raw_method_union_test.cc", |
| 93 | ], |
| 94 | deps = [ |
| 95 | ":method_union", |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 96 | "//pw_protobuf", |
| 97 | "//pw_rpc:internal_test_utils", |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 98 | "//pw_rpc:pw_rpc_test_pwpb", |
Alexei Frolov | b705971 | 2020-10-07 10:02:00 -0700 | [diff] [blame] | 99 | ], |
| 100 | ) |
Wyatt Hepler | 8779bcd | 2020-11-25 07:25:16 -0800 | [diff] [blame] | 101 | |
| 102 | pw_cc_test( |
| 103 | name = "stub_generation_test", |
| 104 | srcs = ["stub_generation_test.cc"], |
Nathaniel Brough | b4f4e7a | 2021-05-06 14:49:55 +0800 | [diff] [blame^] | 105 | deps = [ |
| 106 | "//pw_rpc:pw_rpc_test_pwpb", |
| 107 | "//pw_rpc:server", |
| 108 | "//pw_rpc/raw:method_union", |
| 109 | ], |
Wyatt Hepler | 8779bcd | 2020-11-25 07:25:16 -0800 | [diff] [blame] | 110 | ) |