Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 1 | # Copyright 2019 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 | |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 17 | "pw_cc_library", |
| 18 | "pw_cc_test", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 19 | ) |
| 20 | |
Rob Mohr | c278750 | 2019-11-19 09:50:42 -0800 | [diff] [blame] | 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) # Apache License 2.0 |
| 24 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 25 | pw_cc_library( |
Wyatt Hepler | b4a95e2 | 2020-01-06 10:57:39 -0800 | [diff] [blame] | 26 | name = "pw_unit_test", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 27 | srcs = [ |
| 28 | "framework.cc", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 29 | ], |
| 30 | hdrs = [ |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 31 | "public/pw_unit_test/event_handler.h", |
| 32 | "public/pw_unit_test/framework.h", |
Alexei Frolov | 802c6e4 | 2019-12-17 15:24:35 -0800 | [diff] [blame] | 33 | "public_overrides/gtest/gtest.h", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 34 | ], |
Wyatt Hepler | b4a95e2 | 2020-01-06 10:57:39 -0800 | [diff] [blame] | 35 | includes = [ |
| 36 | "public", |
| 37 | "public_overrides", |
| 38 | ], |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 39 | deps = [ |
Wyatt Hepler | a55d4c7 | 2020-01-16 10:26:04 -0800 | [diff] [blame] | 40 | "//pw_polyfill", |
Wyatt Hepler | b4a95e2 | 2020-01-06 10:57:39 -0800 | [diff] [blame] | 41 | "//pw_preprocessor", |
| 42 | "//pw_string", |
| 43 | ], |
| 44 | ) |
| 45 | |
| 46 | pw_cc_library( |
| 47 | name = "simple_printing_event_handler", |
| 48 | srcs = ["simple_printing_event_handler.cc"], |
| 49 | hdrs = [ |
| 50 | "public/pw_unit_test/simple_printing_event_handler.h", |
| 51 | ], |
| 52 | includes = [ |
| 53 | "public", |
| 54 | ], |
| 55 | deps = [ |
| 56 | "//pw_preprocessor", |
| 57 | "//pw_unit_test", |
| 58 | ], |
| 59 | ) |
| 60 | |
Keir Mierle | da0bccb | 2020-01-17 13:51:35 -0800 | [diff] [blame] | 61 | filegroup( |
| 62 | name = "logging_event_handler", |
| 63 | srcs = [ |
| 64 | "logging_event_handler.cc", |
| 65 | "public/pw_unit_test/logging_event_handler.h", |
Rob Mohr | 372c5bc | 2020-01-29 08:15:21 -0800 | [diff] [blame] | 66 | ], |
Keir Mierle | da0bccb | 2020-01-17 13:51:35 -0800 | [diff] [blame] | 67 | ) |
| 68 | |
| 69 | filegroup( |
| 70 | name = "logging_main", |
| 71 | srcs = [ |
| 72 | "logging_main.cc", |
Rob Mohr | 372c5bc | 2020-01-29 08:15:21 -0800 | [diff] [blame] | 73 | ], |
Keir Mierle | da0bccb | 2020-01-17 13:51:35 -0800 | [diff] [blame] | 74 | ) |
| 75 | |
Wyatt Hepler | b4a95e2 | 2020-01-06 10:57:39 -0800 | [diff] [blame] | 76 | pw_cc_library( |
| 77 | name = "main", |
| 78 | srcs = [ |
Keir Mierle | da0bccb | 2020-01-17 13:51:35 -0800 | [diff] [blame] | 79 | "simple_printing_main.cc", |
Wyatt Hepler | b4a95e2 | 2020-01-06 10:57:39 -0800 | [diff] [blame] | 80 | ], |
| 81 | deps = [ |
| 82 | ":pw_unit_test", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 83 | ":simple_printing_event_handler", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 84 | "//pw_span", |
Armando Montanez | f7a5a74 | 2020-03-02 14:58:59 -0800 | [diff] [blame] | 85 | "//pw_sys_io", |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 86 | ], |
| 87 | ) |
| 88 | |
Alexei Frolov | 8024679 | 2020-11-05 21:12:45 -0800 | [diff] [blame] | 89 | pw_cc_library( |
| 90 | name = "rpc_service", |
| 91 | hdrs = [ |
| 92 | "public/pw_unit_test/internal/rpc_event_handler.h", |
| 93 | "public/pw_unit_test/unit_test_service.h", |
| 94 | ], |
| 95 | srcs = [ |
| 96 | "rpc_event_handler.cc", |
| 97 | "unit_test_service.cc", |
| 98 | ], |
| 99 | deps = [ |
| 100 | ":pw_unit_test", |
| 101 | "//pw_log", |
| 102 | ], |
| 103 | ) |
| 104 | |
| 105 | pw_cc_library( |
| 106 | name = "rpc_main", |
| 107 | srcs = [ |
| 108 | "rpc_main.cc", |
| 109 | ], |
| 110 | deps = [ |
| 111 | ":pw_unit_test", |
| 112 | ":rpc_service", |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 113 | "//pw_hdlc:pw_rpc", |
Alexei Frolov | 8024679 | 2020-11-05 21:12:45 -0800 | [diff] [blame] | 114 | "//pw_log", |
| 115 | "//pw_rpc:server", |
| 116 | ], |
| 117 | ) |
| 118 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 119 | pw_cc_test( |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 120 | name = "framework_test", |
| 121 | srcs = ["framework_test.cc"], |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 122 | deps = [ |
| 123 | ":pw_unit_test", |
| 124 | ], |
Rob Mohr | be98ead | 2019-11-14 07:16:40 -0800 | [diff] [blame] | 125 | ) |