1# 2# Copyright (C) 2015 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 17LOCAL_PATH := $(call my-dir) 18 19include $(CLEAR_VARS) 20LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules collector-device-lib 21LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs 22 23LOCAL_MODULE_TAGS := tests 24LOCAL_COMPATIBILITY_SUITE += device-tests 25 26# List of NNAPI SL libraries for different chipsets, which are determined by SL release notes. 27QC_SM8350_NNAPI_SL_LIBS := libnnapi_sl_driver libQnnGpu libQnnHtp libQnnHtpPrepare libQnnHtpV68Skel libQnnHtpV68Stub libUnnhalAccGpu libUnnhalAccHtp 28QC_SM8450_NNAPI_SL_LIBS := libnnapi_sl_driver libQnnGpu libQnnHtp libQnnHtpPrepare libQnnHtpV69Skel libQnnHtpV69Stub libUnnhalAccGpu libUnnhalAccHtp 29 30# Set the set of SL libraries to use in this test. By default including all 31# chipsets, you can override this variable with a chipset specific one (see 32# QC_SMxxxx_NNAPI_SL_LIBS) test a more realistic NNAPI SL distribution scenario. 33ifeq ($(strip $(SL_LIBS)),) 34 SL_LIBS := $(patsubst $(LOCAL_PATH)/sl_prebuilt/%.so,%,$(wildcard $(LOCAL_PATH)/sl_prebuilt/*.so)) 35endif 36 37LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/nn/benchmark) 38LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni $(SL_LIBS) 39 40# need fread_unlocked in version 28 41LOCAL_SDK_VERSION := 28 42LOCAL_ASSET_DIR := $(LOCAL_PATH)/../models/assets 43 44GOOGLE_TEST_MODELS_DIR := vendor/google/tests/mlts/models/assets 45ifneq ($(wildcard $(GOOGLE_TEST_MODELS_DIR)),) 46LOCAL_ASSET_DIR += $(GOOGLE_TEST_MODELS_DIR) 47endif 48 49# This folder contains metadata describing the SL library distribution. 50# Currently the only one is a file sl_prebuilt_filelist.txt with the list of libraries 51# in this SL. The file is generated by the build_and_run_benchmark.sh script 52# and is used to know the list of files to extract if the user 53SL_PREBUILT_METADATA_DIR := $(LOCAL_PATH)/sl_prebuilt/assets 54ifneq ($(wildcard $(SL_PREBUILT_METADATA_DIR)),) 55LOCAL_ASSET_DIR += $(SL_PREBUILT_METADATA_DIR) 56endif 57 58LOCAL_PACKAGE_NAME := NeuralNetworksApiBenchmark 59LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT 60LOCAL_LICENSE_CONDITIONS := notice 61LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE 62include $(BUILD_PACKAGE) 63 64include $(CLEAR_VARS) 65 66LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules 67LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs 68 69LOCAL_MODULE_TAGS := tests 70LOCAL_COMPATIBILITY_SUITE += device-tests 71 72LOCAL_SRC_FILES := $(call all-java-files-under, src) 73LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni librandom_graph_test_jni $(SL_LIBS) 74 75# need fread_unlocked in version 28 76LOCAL_SDK_VERSION := 28 77LOCAL_ASSET_DIR := $(LOCAL_PATH)/../models/assets 78 79GOOGLE_TEST_MODELS_DIR := vendor/google/tests/mlts/models/assets 80ifneq ($(wildcard $(GOOGLE_TEST_MODELS_DIR)),) 81LOCAL_ASSET_DIR += $(GOOGLE_TEST_MODELS_DIR) 82endif 83 84SL_PREBUILT_METADATA_DIR := $(LOCAL_PATH)/sl_prebuilt/assets 85ifneq ($(wildcard $(SL_PREBUILT_METADATA_DIR)),) 86LOCAL_ASSET_DIR += $(SL_PREBUILT_METADATA_DIR) 87endif 88 89LOCAL_PACKAGE_NAME := NeuralNetworksApiCrashTest 90LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT 91LOCAL_LICENSE_CONDITIONS := notice 92LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE 93include $(BUILD_PACKAGE) 94 95include $(call all-makefiles-under,$(LOCAL_PATH)) 96