# Copyright (C) 2023 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("../../gn/perfetto.gni")
import("../../gn/perfetto_component.gni")
import("../../gn/test.gni")

executable("traced_relay") {
  deps = [
    ":lib",
    "../../gn:default_deps",
    "../../include/perfetto/ext/traced",
    "../base",
    "../base:unix_socket",
    "../base:version",
    "../ipc:perfetto_ipc",
    "../tracing/ipc:default_socket",
  ]
  sources = [ "relay_service_main.cc" ]
}

source_set("lib") {
  public_deps = [ "../../include/perfetto/ext/tracing/ipc" ]
  sources = [
    "relay_service.cc",
    "relay_service.h",
    "socket_relay_handler.cc",
    "socket_relay_handler.h",
  ]
  deps = [
    "../../gn:default_deps",
    "../../protos/perfetto/ipc",
    "../../protos/perfetto/ipc:wire_protocol_cpp",
    "../base",
    "../ipc:perfetto_ipc",
    "../tracing/ipc/producer:relay",  # For relay_ipc_client.h
  ]
}

perfetto_unittest_source_set("unittests") {
  testonly = true
  deps = [
    ":lib",
    "../../gn:default_deps",
    "../../gn:gtest_and_gmock",
    "../base",
    "../base:test_support",
    "../base/threading",
    "../ipc:perfetto_ipc",
  ]
  sources = [
    "relay_service_unittest.cc",
    "socket_relay_handler_unittest.cc",
  ]
}

source_set("integrationtests") {
  testonly = true
  deps = [
    ":lib",
    "../../gn:default_deps",
    "../../gn:gtest_and_gmock",
    "../../test:test_helper",
    "../base",
    "../base:test_support",
  ]
  sources = [ "relay_service_integrationtest.cc" ]
}
