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 15import("../../gn/perfetto.gni") 16import("../../gn/perfetto_component.gni") 17import("../../gn/test.gni") 18 19executable("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 33source_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", 46 "../ipc:perfetto_ipc", 47 "../tracing/ipc/producer:relay", # For relay_ipc_client.h 48 ] 49} 50 51perfetto_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", 60 "../ipc:perfetto_ipc", 61 ] 62 sources = [ 63 "relay_service_unittest.cc", 64 "socket_relay_handler_unittest.cc", 65 ] 66} 67 68source_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} 80