chromium/services/service_manager/tests/service_manager/BUILD.gn

# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")
import("//services/service_manager/public/cpp/service_executable.gni")
import("//testing/test.gni")

source_set("service_manager") {
  testonly = true
  sources = [
    "service_manager_listener_unittest.cc",
    "service_manager_unittest.cc",
  ]

  deps = [
    ":interfaces",
    ":test_manifests",
    "//base",
    "//base/test:test_config",
    "//base/test:test_support",
    "//mojo/public/cpp/platform",
    "//mojo/public/cpp/system",
    "//services/service_manager",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/cpp/test:test_support",
    "//services/service_manager/public/mojom",
    "//testing/gtest",
  ]

  data_deps = [
    ":service_manager_unittest_embedder",
    ":service_manager_unittest_target",
  ]
}

mojom("interfaces") {
  testonly = true
  sources = [ "service_manager.test-mojom" ]

  deps = [ "//services/service_manager/public/mojom" ]
}

source_set("test_manifests") {
  testonly = true
  sources = [
    "test_manifests.cc",
    "test_manifests.h",
  ]
  deps = [
    ":interfaces",
    "//base",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/mojom",
  ]
}

executable("service_manager_unittest_target") {
  testonly = true

  sources = [ "target.cc" ]

  deps = [
    ":interfaces",
    ":test_manifests",
    "//base",
    "//build/win:default_exe_manifest",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/cpp/service_executable:main",
  ]
}

service_executable("service_manager_unittest_embedder") {
  testonly = true
  sources = [ "embedder.cc" ]

  deps = [
    ":interfaces",
    ":test_manifests",
    "//base",
    "//build/win:default_exe_manifest",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/mojom",
  ]
}