| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//third_party/protobuf/proto_library.gni") | 5 import("//third_party/protobuf/proto_library.gni") |
| 6 | 6 |
| 7 component("dbus") { | 7 component("dbus") { |
| 8 sources = [ | 8 sources = [ |
| 9 "bus.cc", | 9 "bus.cc", |
| 10 "bus.h", | 10 "bus.h", |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 "scoped_dbus_error.cc", | 28 "scoped_dbus_error.cc", |
| 29 "scoped_dbus_error.h", | 29 "scoped_dbus_error.h", |
| 30 "string_util.cc", | 30 "string_util.cc", |
| 31 "string_util.h", | 31 "string_util.h", |
| 32 "values_util.cc", | 32 "values_util.cc", |
| 33 "values_util.h", | 33 "values_util.h", |
| 34 "util.cc", | 34 "util.cc", |
| 35 "util.h", | 35 "util.h", |
| 36 ] | 36 ] |
| 37 | 37 |
| 38 defines = [ | 38 defines = [ "DBUS_IMPLEMENTATION" ] |
| 39 "DBUS_IMPLEMENTATION", | |
| 40 ] | |
| 41 | 39 |
| 42 deps = [ | 40 deps = [ |
| 43 "//base", | 41 "//base", |
| 44 "//third_party/protobuf:protobuf_lite", | 42 "//third_party/protobuf:protobuf_lite", |
| 45 ] | 43 ] |
| 46 | 44 |
| 47 public_configs = [ | 45 public_configs = [ "//build/config/linux:dbus" ] |
| 48 "//build/config/linux:dbus", | 46 } |
| 47 |
| 48 proto_library("test_proto") { |
| 49 sources = [ |
| 50 "test_proto.proto", |
| 49 ] | 51 ] |
| 50 } | 52 } |
| 51 | 53 |
| 52 proto_library("test_proto") { | |
| 53 sources = [ "test_proto.proto" ] | |
| 54 } | |
| 55 | |
| 56 # This target contains mocks that can be used to write unit tests without | 54 # This target contains mocks that can be used to write unit tests without |
| 57 # issuing actual D-Bus calls. | 55 # issuing actual D-Bus calls. |
| 58 source_set("test_support") { | 56 source_set("test_support") { |
| 59 testonly = true | 57 testonly = true |
| 60 sources = [ | 58 sources = [ |
| 61 "mock_bus.cc", | 59 "mock_bus.cc", |
| 62 "mock_bus.h", | 60 "mock_bus.h", |
| 63 "mock_exported_object.cc", | 61 "mock_exported_object.cc", |
| 64 "mock_exported_object.h", | 62 "mock_exported_object.h", |
| 65 "mock_object_manager.cc", | 63 "mock_object_manager.cc", |
| 66 "mock_object_manager.h", | 64 "mock_object_manager.h", |
| 67 "mock_object_proxy.cc", | 65 "mock_object_proxy.cc", |
| 68 "mock_object_proxy.h", | 66 "mock_object_proxy.h", |
| 69 ] | 67 ] |
| 70 | 68 |
| 71 deps = [ | 69 deps = [ |
| 72 ":dbus", | 70 ":dbus", |
| 73 "//testing/gmock", | 71 "//testing/gmock", |
| 74 ] | 72 ] |
| 75 | 73 |
| 76 configs += [ | 74 configs += [ "//build/config/linux:dbus" ] |
| 77 "//build/config/linux:dbus", | |
| 78 ] | |
| 79 } | 75 } |
| 80 | 76 |
| 81 test("dbus_unittests") { | 77 test("dbus_unittests") { |
| 82 sources = [ | 78 sources = [ |
| 83 "bus_unittest.cc", | 79 "bus_unittest.cc", |
| 84 "dbus_statistics_unittest.cc", | 80 "dbus_statistics_unittest.cc", |
| 85 "end_to_end_async_unittest.cc", | 81 "end_to_end_async_unittest.cc", |
| 86 "end_to_end_sync_unittest.cc", | 82 "end_to_end_sync_unittest.cc", |
| 87 "message_unittest.cc", | 83 "message_unittest.cc", |
| 88 "mock_unittest.cc", | 84 "mock_unittest.cc", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 101 deps = [ | 97 deps = [ |
| 102 ":dbus", | 98 ":dbus", |
| 103 ":test_proto", | 99 ":test_proto", |
| 104 ":test_support", | 100 ":test_support", |
| 105 "//base/test:test_support", | 101 "//base/test:test_support", |
| 106 "//testing/gmock", | 102 "//testing/gmock", |
| 107 "//testing/gtest", | 103 "//testing/gtest", |
| 108 "//third_party/protobuf:protobuf_lite", | 104 "//third_party/protobuf:protobuf_lite", |
| 109 ] | 105 ] |
| 110 | 106 |
| 111 configs += [ | 107 configs += [ "//build/config/linux:dbus" ] |
| 112 "//build/config/linux:dbus", | |
| 113 ] | |
| 114 } | 108 } |
| 115 | 109 |
| 116 executable("dbus_test_server") { | 110 executable("dbus_test_server") { |
| 117 testonly = true | 111 testonly = true |
| 118 sources = [ | 112 sources = [ |
| 119 "test_server.cc", | 113 "test_server.cc", |
| 120 "test_service.cc", | 114 "test_service.cc", |
| 121 "test_service.h", | 115 "test_service.h", |
| 122 ] | 116 ] |
| 123 | 117 |
| 124 deps = [ | 118 deps = [ |
| 125 ":dbus", | 119 ":dbus", |
| 126 "//base", | 120 "//base", |
| 127 "//base/test:test_support", | 121 "//base/test:test_support", |
| 128 ] | 122 ] |
| 129 | 123 |
| 130 configs += [ | 124 configs += [ "//build/config/linux:dbus" ] |
| 131 "//build/config/linux:dbus", | |
| 132 ] | |
| 133 } | 125 } |
| OLD | NEW |