blob: 6799e34fe6ad2b442ef4c25d1f46090685b3fe84 [file] [log] [blame]
Chinglin Yu4ce83902023-06-28 08:16:35 +00001# 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")
Chinglin Yu5682f422023-10-13 14:28:04 +080017import("../../gn/test.gni")
Chinglin Yu4ce83902023-06-28 08:16:35 +000018
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",
Primiano Tuccid4bbac32024-02-09 16:45:56 +000046 "../ipc:perfetto_ipc",
Chinglin Yu76788d22024-02-21 15:49:43 +080047 "../tracing/ipc/producer:relay", # For relay_ipc_client.h
Chinglin Yu4ce83902023-06-28 08:16:35 +000048 ]
49}
Chinglin Yu5682f422023-10-13 14:28:04 +080050
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",
Primiano Tuccid4bbac32024-02-09 16:45:56 +000060 "../ipc:perfetto_ipc",
Chinglin Yu5682f422023-10-13 14:28:04 +080061 ]
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}