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 17package { 18 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "hardware_interfaces_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["hardware_interfaces_license"], 24} 25 26cc_defaults { 27 name: "neuralnetworks_vts_functional_defaults", 28 defaults: ["VtsHalTargetTestDefaults"], 29 arch: { 30 x86: { 31 cflags: [ "-D_Float16=__fp16", 32 "-Xclang", "-fnative-half-type", 33 "-Xclang", "-fallow-half-arguments-and-returns" ], 34 }, 35 x86_64: { 36 cflags: [ "-D_Float16=__fp16", 37 "-Xclang", "-fnative-half-type", 38 "-Xclang", "-fallow-half-arguments-and-returns" ], 39 }, 40 }, 41} 42 43cc_library_static { 44 name: "VtsHalNeuralNetworksV1_0_utils", 45 srcs: [ 46 "Callbacks.cpp", 47 "Utils.cpp", 48 ], 49 defaults: ["neuralnetworks_vts_functional_defaults"], 50 export_include_dirs: ["include"], 51 shared_libs: [ 52 "libfmq", 53 "libnativewindow", 54 ], 55 static_libs: [ 56 "android.hardware.neuralnetworks@1.0", 57 "android.hidl.allocator@1.0", 58 "android.hidl.memory@1.0", 59 "libgmock", 60 "libhidlmemory", 61 "libneuralnetworks_generated_test_harness", 62 "libneuralnetworks_utils", 63 ], 64 header_libs: [ 65 "libneuralnetworks_headers", 66 ], 67} 68 69cc_test { 70 name: "VtsHalNeuralnetworksV1_0TargetTest", 71 defaults: ["neuralnetworks_vts_functional_defaults"], 72 srcs: [ 73 "BasicTests.cpp", 74 "GeneratedTestHarness.cpp", 75 "TestAssertions.cpp", 76 "TestMain.cpp", 77 "ValidateModel.cpp", 78 "ValidateRequest.cpp", 79 "VtsHalNeuralnetworks.cpp", 80 ], 81 shared_libs: [ 82 "libfmq", 83 "libnativewindow", 84 ], 85 static_libs: [ 86 "android.hardware.neuralnetworks@1.0", 87 "android.hidl.allocator@1.0", 88 "android.hidl.memory@1.0", 89 "libgmock", 90 "libhidlmemory", 91 "libneuralnetworks_generated_test_harness", 92 "libneuralnetworks_utils", 93 "VtsHalNeuralNetworksV1_0_utils", 94 ], 95 whole_static_libs: [ 96 "neuralnetworks_generated_V1_0_example", 97 ], 98 header_libs: [ 99 "libneuralnetworks_headers", 100 ], 101 test_suites: ["general-tests", "vts"], 102} 103