1/* 2 * Copyright (C) 2019 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: "hidl2aidl_test_gen_aidl", 19 tools: ["hidl2aidl"], 20 cmd: "$(location hidl2aidl) -o $(genDir)/ " + 21 "-rhidl2aidl:system/tools/hidl/hidl2aidl/test " + 22 "hidl2aidl@1.0 hidl2aidl@2.0", 23 required: ["android.hidl.base@1.0"], 24 srcs: [ 25 "1.0/IBar.hal", 26 "1.0/IFoo.hal", 27 "1.0/types.hal", 28 "1.1/IFoo.hal", 29 "1.1/types.hal", 30 "2.0/IFoo.hal", 31 ], 32 out: [ 33 "hidl2aidl/IBar.aidl", 34 "hidl2aidl/IBarInner.aidl", 35 "hidl2aidl/IFoo.aidl", 36 "hidl2aidl/IFooBigStruct.aidl", 37 "hidl2aidl/OnlyIn10.aidl", 38 "hidl2aidl/OnlyIn11.aidl", 39 "hidl2aidl/Outer.aidl", 40 "hidl2aidl/OuterInner.aidl", 41 "hidl2aidl/OverrideMe.aidl", 42 "hidl2aidl/Value.aidl", 43 "hidl2aidl2/IFoo.aidl", 44 ], 45} 46 47aidl_interface { 48 name: "hidl2aidl_test_gen", 49 unstable: true, 50 srcs: [":hidl2aidl_test_gen_aidl"], 51} 52 53cc_test_library { 54 name: "hidl2aidl_test_comp_cc", 55 srcs: [ 56 "cpp_test_compile.cpp", 57 "ndk_test_compile.cpp", 58 ], 59 shared_libs: [ 60 "hidl2aidl_test_gen-cpp", 61 "hidl2aidl_test_gen-ndk_platform", 62 "libbinder", 63 "libbinder_ndk", 64 "libutils", 65 ], 66 gtest: false, 67} 68 69phony { 70 name: "hidl2aidl_test", 71 required: [ 72 "hidl2aidl_test_comp_cc", 73 "hidl2aidl_test_gen", 74 ], 75} 76