910e62b5创建于 1月15日历史提交
# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//remoting/build/config/remoting_build.gni")

group("remoting_all") {
  testonly = true

  deps = [ ":remoting_unittests" ]

  if (is_win) {
    deps += [
      "//remoting/host/win:all",
      "//remoting/tools:remoting_breakpad_tester",
    ]

    if (is_chrome_branded) {
      deps += [ "//remoting/host:remoting_host_installation" ]
    }
  }

  if (enable_remoting_host) {
    deps += [
      ":remoting_perftests",
      "//remoting/host",
    ]

    if (!is_chromeos && !is_android) {
      deps += [
        "//remoting/host:remoting_native_messaging_manifests",
        "//remoting/host:remoting_start_host",
      ]

      # it2me.
      deps += [ "//remoting/host/it2me:remote_assistance_host" ]
      if (is_win) {
        deps += [ "//remoting/host/it2me:remote_assistance_host_uiaccess" ]
      }
    }

    if (is_linux) {
      deps += [
        "//remoting/host/crash:crash_tools",
        "//remoting/host/linux:remoting_dev_me2me_host",
        "//remoting/host/linux:remoting_user_session",
      ]
    }

    if (use_glib) {
      deps += [ "//remoting/host/linux/dbus_interfaces:gen_dbus_interface" ]
    }
  }

  if (enable_me2me_host) {
    deps += [ "//remoting/host:remoting_me2me_host" ]
    if (is_chrome_branded) {
      deps += [ "//remoting/host:remoting_me2me_host_archive" ]
    }
  }

  if (enable_remoting_client) {
    deps += [ "//remoting/client/common" ]
    if (is_linux) {
      deps += [ "//remoting/client/cli:remoting_client_main" ]
    }
  }
}

group("test_support") {
  testonly = true

  deps = [
    "//base",
    "//net",
    "//remoting/base:test_support",
    "//remoting/codec:decoder",
    "//remoting/codec:encoder",
    "//remoting/protocol:test_support",
    "//remoting/resources",
    "//remoting/signaling:test_support",
    "//remoting/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (enable_remoting_host) {
    deps += [ "//remoting/host:test_support" ]
  }
}

test("remoting_unittests") {
  defines = []
  libs = []

  configs += [ "//remoting/build/config:version" ]

  deps = [
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//google_apis",
    "//remoting/base:unit_tests",
    "//remoting/protocol:unit_tests",
    "//remoting/signaling:unit_tests",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (enable_remoting_host) {
    deps += [
      "//remoting/codec:unit_tests",
      "//remoting/host:unit_tests",
      "//ui/gfx",
    ]
  }

  deps += [ "//third_party/webrtc_overrides:webrtc_component" ]

  if (is_android) {
    deps += [ "//net/android:net_java" ]

    libs += [ "android" ]
  }

  if (is_win) {
    defines += [ "_ALT_NO_EXCEPTIONS" ]

    libs += [
      "comctl32.lib",
      "rpcrt4.lib",
      "wtsapi32.lib",
    ]
  }
}

if (enable_remoting_host) {
  test("remoting_perftests") {
    defines = []
    libs = []

    sources = [ "test/codec_perftest.cc" ]

    configs += [ "//remoting/build/config:version" ]

    deps = [
      ":test_support",
      "//base",
      "//base/test:run_all_unittests",
      "//base/test:test_support",
      "//components/webrtc:thread_wrapper",
      "//net:test_support",
      "//remoting/base",
      "//remoting/codec:encoder",
      "//remoting/host:common",
      "//remoting/host:test_support",
      "//remoting/protocol",
      "//remoting/signaling:test_support",
      "//remoting/test:test_support",
      "//testing/gtest",
      "//third_party/webrtc_overrides:webrtc_component",
    ]

    if (is_win) {
      defines += [ "_ALT_NO_EXCEPTIONS" ]

      libs += [
        "rpcrt4.lib",
        "wtsapi32.lib",
      ]
    }
  }
}