Chinglin Yu | 4ce8390 | 2023-06-28 08:16:35 +0000 | [diff] [blame] | 1 | # Copyright (C) 2023 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://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, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("../../gn/perfetto.gni") |
| 16 | import("../../gn/perfetto_component.gni") |
Chinglin Yu | 5682f42 | 2023-10-13 14:28:04 +0800 | [diff] [blame] | 17 | import("../../gn/test.gni") |
Chinglin Yu | 4ce8390 | 2023-06-28 08:16:35 +0000 | [diff] [blame] | 18 | |
| 19 | executable("traced_relay") { |
| 20 | deps = [ |
| 21 | ":lib", |
| 22 | "../../gn:default_deps", |
| 23 | "../../include/perfetto/ext/traced", |
| 24 | "../base", |
| 25 | "../base:unix_socket", |
| 26 | "../base:version", |
| 27 | "../ipc:perfetto_ipc", |
| 28 | "../tracing/ipc:default_socket", |
| 29 | ] |
| 30 | sources = [ "relay_service_main.cc" ] |
| 31 | } |
| 32 | |
| 33 | source_set("lib") { |
| 34 | public_deps = [ "../../include/perfetto/ext/tracing/ipc" ] |
| 35 | sources = [ |
| 36 | "relay_service.cc", |
| 37 | "relay_service.h", |
| 38 | "socket_relay_handler.cc", |
| 39 | "socket_relay_handler.h", |
| 40 | ] |
| 41 | deps = [ |
| 42 | "../../gn:default_deps", |
| 43 | "../../protos/perfetto/ipc", |
| 44 | "../../protos/perfetto/ipc:wire_protocol_cpp", |
| 45 | "../base", |
Primiano Tucci | d4bbac3 | 2024-02-09 16:45:56 +0000 | [diff] [blame] | 46 | "../ipc:perfetto_ipc", |
Chinglin Yu | 76788d2 | 2024-02-21 15:49:43 +0800 | [diff] [blame] | 47 | "../tracing/ipc/producer:relay", # For relay_ipc_client.h |
Chinglin Yu | 4ce8390 | 2023-06-28 08:16:35 +0000 | [diff] [blame] | 48 | ] |
| 49 | } |
Chinglin Yu | 5682f42 | 2023-10-13 14:28:04 +0800 | [diff] [blame] | 50 | |
| 51 | perfetto_unittest_source_set("unittests") { |
| 52 | testonly = true |
| 53 | deps = [ |
| 54 | ":lib", |
| 55 | "../../gn:default_deps", |
| 56 | "../../gn:gtest_and_gmock", |
| 57 | "../base", |
| 58 | "../base:test_support", |
| 59 | "../base/threading", |
Primiano Tucci | d4bbac3 | 2024-02-09 16:45:56 +0000 | [diff] [blame] | 60 | "../ipc:perfetto_ipc", |
Chinglin Yu | 5682f42 | 2023-10-13 14:28:04 +0800 | [diff] [blame] | 61 | ] |
| 62 | sources = [ |
| 63 | "relay_service_unittest.cc", |
| 64 | "socket_relay_handler_unittest.cc", |
| 65 | ] |
| 66 | } |
| 67 | |
| 68 | source_set("integrationtests") { |
| 69 | testonly = true |
| 70 | deps = [ |
| 71 | ":lib", |
| 72 | "../../gn:default_deps", |
| 73 | "../../gn:gtest_and_gmock", |
| 74 | "../../test:test_helper", |
| 75 | "../base", |
| 76 | "../base:test_support", |
| 77 | ] |
| 78 | sources = [ "relay_service_integrationtest.cc" ] |
| 79 | } |