1// 2// Copyright (C) 2017 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17genrule { 18 name: "nos_generator_test_service_genc++", 19 out: ["Hello.client.cpp"], 20 srcs: ["nos/generator/test/test.proto"], 21 tools: ["aprotoc", "protoc-gen-nos-client-cpp"], 22 cmd: GEN_SERVICE_SOURCE + "-Iexternal/nos/host/generic/libnos/generator/test", 23} 24 25genrule { 26 name: "nos_generator_test_service_genc++_headers", 27 out: ["Hello.client.h"], 28 srcs: ["nos/generator/test/test.proto"], 29 tools: ["aprotoc", "protoc-gen-nos-client-cpp"], 30 cmd: GEN_SERVICE_HEADER + "-Iexternal/nos/host/generic/libnos/generator/test", 31} 32 33genrule { 34 name: "nos_generator_test_service_genc++_mock", 35 out: ["MockHello.client.h"], 36 srcs: ["nos/generator/test/test.proto"], 37 tools: ["aprotoc", "protoc-gen-nos-client-cpp"], 38 cmd: GEN_SERVICE_MOCK + "-Iexternal/nos/host/generic/libnos/generator/test", 39} 40 41cc_test_host { 42 name: "protoc-gen-nos-client-cpp_test", 43 generated_sources: ["nos_generator_test_service_genc++"], 44 generated_headers: [ 45 "nos_generator_test_service_genc++_headers", 46 "nos_generator_test_service_genc++_mock", 47 ], 48 srcs: [ 49 "test.cpp", 50 "nos/generator/test/test.proto", 51 ], 52 defaults: ["nos_proto_defaults"], 53 proto: { 54 type: "full", 55 canonical_path_from_root: false, 56 include_dirs: [ 57 "external/protobuf/src", 58 "external/nos/host/generic/nugget/proto", 59 ], 60 }, 61 header_libs: ["nos_headers"], 62 static_libs: [ 63 "libgmock", 64 "libnos_mock", 65 "libnosprotos", 66 ], 67} 68