1/* 2 * Copyright 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 17cc_defaults { 18 name: "NeuralNetworksTest_defaults", 19 defaults: ["neuralnetworks_defaults"], 20 host_supported: false, 21 openmp: true, 22 srcs: [ 23 // Subset of tests that rely only on public functionality. 24 // 25 // Changes to this list must be reflected in cts/tests/tests/neuralnetworks/Android.mk 26 // to ensure CTS tests coverage. 27 "TestGenerated.cpp", 28 "TestMemory.cpp", 29 "TestTrivialModel.cpp", 30 "TestUnknownDimensions.cpp", 31 "TestValidateOperations.cpp", 32 "TestValidation.cpp", 33 "TestWrapper.cpp", 34 ], 35 shared_libs: [ 36 "libandroid", 37 "libbase", 38 "libhidlbase", 39 "libhidltransport", 40 "libhidlmemory", 41 "liblog", 42 "libtextclassifier_hash", 43 "libutils", 44 "android.hardware.neuralnetworks@1.0", 45 "android.hardware.neuralnetworks@1.1", 46 "android.hidl.allocator@1.0", 47 "android.hidl.memory@1.0", 48 ], 49 header_libs: [ 50 "libneuralnetworks_generated_test_harness_headers", 51 ], 52 /* To enable address sanitizer, uncomment the block below 53 * here and in ../../Android.bp. You will have to 54 * do a full 'adb sync' after building. */ 55 /* sanitize: { 56 address: true, 57 }, */ 58} 59 60cc_test { 61 name: "NeuralNetworksTest_shared_partial", 62 defaults: ["NeuralNetworksTest_defaults"], 63 srcs: [ 64 "TestMain.cpp", 65 ], 66 cflags: [ 67 "-DNNTEST_ONLY_PUBLIC_API" 68 ], 69 shared_libs: [ 70 "libneuralnetworks", 71 "libtextclassifier_hash", 72 ], 73} 74 75cc_test { 76 name: "NeuralNetworksTest_static", 77 defaults: ["NeuralNetworksTest_defaults"], 78 srcs: [ 79 "TestMain.cpp", 80 81 "Bridge.cpp", 82 // Tests that rely on non-public functionality (i.e., symbols 83 // not exported from libneuralnetworks.so). 84 "TestExecution.cpp", 85 "TestMemoryInternal.cpp", 86 "TestOpenmpSettings.cpp", 87 "TestPartitioning.cpp", 88 "TestPartitioningRandom.cpp", 89 ], 90 static_libs: [ 91 "libneuralnetworks", 92 "libneuralnetworks_common", 93 "libSampleDriver", 94 ], 95 shared_libs: [ 96 "libcutils", 97 ], 98 header_libs: [ 99 "libneuralnetworks_private_headers", 100 ], 101} 102