[M120 Migration][VD] Fix url crash in RequestCertificateConfirm
[platform/framework/web/chromium-efl.git] / dbus / BUILD.gn
1 # Copyright 2014 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8 import("//third_party/protobuf/proto_library.gni")
9
10 assert(use_dbus)
11
12 component("dbus") {
13   sources = [
14     "bus.cc",
15     "bus.h",
16     "dbus_export.h",
17     "dbus_result.cc",
18     "dbus_result.h",
19     "dbus_statistics.cc",
20     "dbus_statistics.h",
21     "error.cc",
22     "error.h",
23     "exported_object.cc",
24     "exported_object.h",
25     "message.cc",
26     "message.h",
27     "object_manager.cc",
28     "object_manager.h",
29     "object_path.cc",
30     "object_path.h",
31     "object_proxy.cc",
32     "object_proxy.h",
33     "property.cc",
34     "property.h",
35     "scoped_dbus_error.cc",
36     "scoped_dbus_error.h",
37     "string_util.cc",
38     "string_util.h",
39     "util.cc",
40     "util.h",
41     "values_util.cc",
42     "values_util.h",
43   ]
44
45   defines = [ "DBUS_IMPLEMENTATION" ]
46
47   deps = [ "//third_party/protobuf:protobuf_lite" ]
48   public_deps = [ "//base" ]
49
50   public_configs = [ "//build/config/linux/dbus" ]
51   configs += [ "//build/config/compiler:wexit_time_destructors" ]
52 }
53
54 proto_library("test_proto") {
55   sources = [ "test_proto.proto" ]
56 }
57
58 # This target contains mocks that can be used to write unit tests without
59 # issuing actual D-Bus calls.
60 static_library("test_support") {
61   testonly = true
62   sources = [
63     "mock_bus.cc",
64     "mock_bus.h",
65     "mock_exported_object.cc",
66     "mock_exported_object.h",
67     "mock_object_proxy.cc",
68     "mock_object_proxy.h",
69   ]
70
71   public_deps = [ ":dbus" ]
72   deps = [ "//testing/gmock" ]
73
74   configs += [ "//build/config/linux/dbus" ]
75 }
76
77 test("dbus_unittests") {
78   use_xvfb = use_xvfb_in_this_config
79
80   sources = [
81     "bus_unittest.cc",
82     "dbus_statistics_unittest.cc",
83     "end_to_end_async_unittest.cc",
84     "end_to_end_sync_unittest.cc",
85     "message_unittest.cc",
86     "mock_unittest.cc",
87     "object_manager_unittest.cc",
88     "object_proxy_unittest.cc",
89     "property_unittest.cc",
90     "signal_sender_verification_unittest.cc",
91     "string_util_unittest.cc",
92     "test_service.cc",
93     "test_service.h",
94     "util_unittest.cc",
95     "values_util_unittest.cc",
96   ]
97
98   deps = [
99     ":dbus",
100     ":test_proto",
101     ":test_support",
102     "//base/test:run_all_unittests",
103     "//base/test:test_support",
104     "//testing/gmock",
105     "//testing/gtest",
106     "//third_party/protobuf:protobuf_lite",
107   ]
108
109   configs += [ "//build/config/linux/dbus" ]
110 }
111
112 executable("dbus_test_server") {
113   testonly = true
114   sources = [
115     "test_server.cc",
116     "test_service.cc",
117     "test_service.h",
118   ]
119
120   deps = [
121     ":dbus",
122     "//base",
123     "//base/test:test_support",
124   ]
125
126   configs += [ "//build/config/linux/dbus" ]
127 }