summaryrefslogtreecommitdiff
path: root/chromium/chromeos/services/BUILD.gn
blob: bcab6da2ad20e1958b9661dcd081f728b41f9b3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")
import("//chromeos/assistant/assistant.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/tools/test/service_test.gni")
import("//testing/test.gni")

assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")

# Use this target for adding new unit tests. To add a unit test to this target,
# create a "unit_tests" source_set in your service and add it as a dependency
# here.
#
# Unit tests are generally preferred over service tests as they are simpler to
# create and maintain. Check out service_manager::TestConnectorFactory for an
# easy way to test your services.
source_set("unit_tests") {
  testonly = true
  deps = [
    "//chromeos/services/device_sync:unit_tests",
    "//chromeos/services/multidevice_setup:unit_tests",
  ]
}

# Use this target for adding new service tests. To add a unit test to this
# target, create a "tests" source_set in your service and add it as a dependency
# here.
#
# If your unit tests use the ServiceTest framework, you must also include
# corresponding catalog entries in the "chromeos_services_unittests_catalog"
# target below.
service_test("chromeos_services_unittests") {
  deps = []

  if (enable_cros_assistant) {
    deps += [ "//chromeos/services/assistant:tests" ]
  }

  catalog = ":chromeos_services_unittests_catalog"
}

catalog("chromeos_services_unittests_catalog") {
  testonly = true

  catalog_deps = []

  if (enable_cros_assistant) {
    catalog_deps += [ "//chromeos/services/assistant:tests_catalog" ]
  }
}