Roll usrcstplib -> r9048.
[chromium-blink-merge.git] / dbus / BUILD.gn
blob830bd19406c359148dbcbab4126a6cd5de7b2ae5
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//third_party/protobuf/proto_library.gni")
7 component("dbus") {
8   sources = [
9     "bus.cc",
10     "bus.h",
11     "dbus_export.h",
12     "dbus_statistics.cc",
13     "dbus_statistics.h",
14     "exported_object.cc",
15     "exported_object.h",
16     "file_descriptor.cc",
17     "file_descriptor.h",
18     "message.cc",
19     "message.h",
20     "object_manager.cc",
21     "object_manager.h",
22     "object_path.cc",
23     "object_path.h",
24     "object_proxy.cc",
25     "object_proxy.h",
26     "property.cc",
27     "property.h",
28     "scoped_dbus_error.cc",
29     "scoped_dbus_error.h",
30     "string_util.cc",
31     "string_util.h",
32     "values_util.cc",
33     "values_util.h",
34     "util.cc",
35     "util.h",
36   ]
38   defines = [
39     "DBUS_IMPLEMENTATION",
40   ]
42   deps = [
43     "//base",
44     "//third_party/protobuf:protobuf_lite",
45   ]
47   public_configs = [
48     "//build/config/linux:dbus",
49   ]
52 proto_library("test_proto") {
53   sources = [ "test_proto.proto" ]
56 # This target contains mocks that can be used to write unit tests without
57 # issuing actual D-Bus calls.
58 source_set("test_support") {
59   testonly = true
60   sources = [
61     "mock_bus.cc",
62     "mock_bus.h",
63     "mock_exported_object.cc",
64     "mock_exported_object.h",
65     "mock_object_manager.cc",
66     "mock_object_manager.h",
67     "mock_object_proxy.cc",
68     "mock_object_proxy.h",
69   ]
71   deps = [
72     ":dbus",
73     "//testing/gmock",
74   ]
76   configs += [
77     "//build/config/linux:dbus",
78   ]
81 test("dbus_unittests") {
82   sources = [
83     "bus_unittest.cc",
84     "dbus_statistics_unittest.cc",
85     "end_to_end_async_unittest.cc",
86     "end_to_end_sync_unittest.cc",
87     "message_unittest.cc",
88     "mock_unittest.cc",
89     "object_manager_unittest.cc",
90     "object_proxy_unittest.cc",
91     "property_unittest.cc",
92     "run_all_unittests.cc",
93     "signal_sender_verification_unittest.cc",
94     "string_util_unittest.cc",
95     "test_service.cc",
96     "test_service.h",
97     "util_unittest.cc",
98     "values_util_unittest.cc",
99   ]
101   deps = [
102     ":dbus",
103     ":test_proto",
104     ":test_support",
105     "//base/test:test_support",
106     "//testing/gmock",
107     "//testing/gtest",
108     "//third_party/protobuf:protobuf_lite",
109   ]
111   configs += [
112     "//build/config/linux:dbus",
113   ]
116 executable("dbus_test_server") {
117   testonly = true
118   sources = [
119     "test_server.cc",
120     "test_service.cc",
121     "test_service.h",
122   ]
124   deps = [
125     ":dbus",
126     "//base",
127     "//base/test:test_support",
128   ]
130   configs += [
131     "//build/config/linux:dbus",
132   ]