Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 15 | import("//build/proto_library.gni") |
Primiano Tucci | 91cc11d | 2017-11-14 18:34:24 +0000 | [diff] [blame^] | 16 | import("ipc_library.gni") |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 17 | |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 18 | config("config") { |
| 19 | include_dirs = [ "include" ] |
| 20 | } |
| 21 | |
Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 22 | source_set("ipc") { |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 23 | public_configs = [ ":config" ] |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 24 | deps += [ |
| 25 | ":wire_protocol", |
| 26 | "//base", |
| 27 | ] |
Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 28 | sources = [ |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 29 | "include/ipc/async_result.h", |
| 30 | "include/ipc/basic_types.h", |
| 31 | "include/ipc/deferred.h", |
Primiano Tucci | 420e47e | 2017-11-14 11:31:49 +0000 | [diff] [blame] | 32 | "include/ipc/host.h", |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 33 | "src/buffered_frame_deserializer.cc", |
Primiano Tucci | ed0ce25 | 2017-11-09 19:35:10 +0000 | [diff] [blame] | 34 | "src/client_impl.cc", |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 35 | "src/deferred.cc", |
Primiano Tucci | 420e47e | 2017-11-14 11:31:49 +0000 | [diff] [blame] | 36 | "src/host_impl.cc", |
| 37 | "src/host_impl.h", |
Primiano Tucci | ed0ce25 | 2017-11-09 19:35:10 +0000 | [diff] [blame] | 38 | "src/service_proxy.cc", |
Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 39 | "src/unix_socket.cc", |
| 40 | ] |
| 41 | } |
| 42 | |
| 43 | executable("ipc_unittests") { |
| 44 | testonly = true |
| 45 | deps += [ |
| 46 | ":ipc", |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 47 | ":test_messages", |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 48 | ":wire_protocol", |
Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 49 | "//base", |
| 50 | "//base:test_support", |
| 51 | "//buildtools:gmock", |
| 52 | "//buildtools:gtest", |
| 53 | "//buildtools:gtest_main", |
| 54 | ] |
| 55 | sources = [ |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 56 | "src/buffered_frame_deserializer_unittest.cc", |
Primiano Tucci | ed0ce25 | 2017-11-09 19:35:10 +0000 | [diff] [blame] | 57 | "src/client_impl_unittest.cc", |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 58 | "src/deferred_unittest.cc", |
Primiano Tucci | 420e47e | 2017-11-14 11:31:49 +0000 | [diff] [blame] | 59 | "src/host_impl_unittest.cc", |
Primiano Tucci | 91cc11d | 2017-11-14 18:34:24 +0000 | [diff] [blame^] | 60 | "src/test/ipc_integrationtest.cc", |
Primiano Tucci | e73ac93 | 2017-11-08 18:11:17 +0000 | [diff] [blame] | 61 | "src/unix_socket_unittest.cc", |
| 62 | ] |
| 63 | } |
Primiano Tucci | 9ebb882 | 2017-11-09 18:36:25 +0000 | [diff] [blame] | 64 | |
| 65 | proto_library("wire_protocol") { |
| 66 | sources = [ |
| 67 | "src/wire_protocol.proto", |
| 68 | ] |
| 69 | include_dirs = [ "include" ] |
| 70 | proto_in_dir = "src/" |
| 71 | } |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 72 | |
Primiano Tucci | 91cc11d | 2017-11-14 18:34:24 +0000 | [diff] [blame^] | 73 | ipc_library("test_messages") { |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 74 | sources = [ |
Primiano Tucci | ed0ce25 | 2017-11-09 19:35:10 +0000 | [diff] [blame] | 75 | "src/test/client_unittest_messages.proto", |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 76 | "src/test/deferred_unittest_messages.proto", |
Primiano Tucci | ed0ce25 | 2017-11-09 19:35:10 +0000 | [diff] [blame] | 77 | "src/test/greeter_service.proto", |
Primiano Tucci | c85d933 | 2017-11-09 18:47:42 +0000 | [diff] [blame] | 78 | ] |
| 79 | include_dirs = [ "include" ] |
| 80 | proto_in_dir = "src/test" |
| 81 | } |