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:clock_snapshots", 26 "../base:unix_socket", 27 "../base:version", 28 "../ipc:perfetto_ipc", 29 "../tracing/ipc:default_socket", 30 ] 31 sources = [ "relay_service_main.cc" ] 32} 33 34source_set("lib") { 35 public_deps = [ "../../include/perfetto/ext/tracing/ipc" ] 36 sources = [ 37 "relay_service.cc", 38 "relay_service.h", 39 "socket_relay_handler.cc", 40 "socket_relay_handler.h", 41 ] 42 deps = [ 43 "../../gn:default_deps", 44 "../../protos/perfetto/ipc", 45 "../../protos/perfetto/ipc:wire_protocol_cpp", 46 "../base", 47 "../ipc:perfetto_ipc", 48 "../tracing/ipc/producer:relay", # For relay_ipc_client.h 49 ] 50} 51 52perfetto_unittest_source_set("unittests") { 53 testonly = true 54 deps = [ 55 ":lib", 56 "../../gn:default_deps", 57 "../../gn:gtest_and_gmock", 58 "../base", 59 "../base:test_support", 60 "../base/threading", 61 "../ipc:perfetto_ipc", 62 ] 63 sources = [ 64 "relay_service_unittest.cc", 65 "socket_relay_handler_unittest.cc", 66 ] 67} 68 69source_set("integrationtests") { 70 testonly = true 71 deps = [ 72 ":lib", 73 "../../gn:default_deps", 74 "../../gn:gtest_and_gmock", 75 "../../test:test_helper", 76 "../base", 77 "../base:test_support", 78 ] 79 sources = [ "relay_service_integrationtest.cc" ] 80} 81