blob: 9d19497f0060e9940fd4dc5f089f7d0862d94c9e [file] [log] [blame]
Przemyslaw Szczepaniaka8ff13f2018-05-17 14:19:44 +01001#
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)
Viet Dang540bd3e2021-02-16 14:10:59 +000020LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules collector-device-lib
Przemyslaw Szczepaniakf1e93342018-10-10 14:16:53 +010021LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
Przemyslaw Szczepaniaka8ff13f2018-05-17 14:19:44 +010022
23LOCAL_MODULE_TAGS := tests
24LOCAL_COMPATIBILITY_SUITE += device-tests
25
Ian Hua32216092022-02-21 16:23:06 +000026# List of NNAPI SL libraries for different chipsets, which are determined by SL release notes.
Ian Hua5c7ee942022-04-07 15:53:16 +010027QC_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
Stefano Galarragafdbb44e2021-10-04 17:20:17 +010029
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
Stefano Galarraga650bda52020-06-17 11:03:07 +010037LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/nn/benchmark)
Stefano Galarraga731fc142021-10-18 17:34:25 +010038LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni $(SL_LIBS)
Przemyslaw Szczepaniaka8ff13f2018-05-17 14:19:44 +010039
Chih-Hung Hsiehbdc93452020-01-27 11:34:37 -080040# need fread_unlocked in version 28
41LOCAL_SDK_VERSION := 28
Przemyslaw Szczepaniaka8ff13f2018-05-17 14:19:44 +010042LOCAL_ASSET_DIR := $(LOCAL_PATH)/../models/assets
43
David Rime441c872018-06-01 15:55:11 +090044GOOGLE_TEST_MODELS_DIR := vendor/google/tests/mlts/models/assets
45ifneq ($(wildcard $(GOOGLE_TEST_MODELS_DIR)),)
46LOCAL_ASSET_DIR += $(GOOGLE_TEST_MODELS_DIR)
47endif
48
Stefano Galarragafdbb44e2021-10-04 17:20:17 +010049# 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)
Stefano Galarraga57b6e4c2021-09-10 15:18:12 +010056endif
57
Viet Dang1f0f4402019-01-09 17:41:26 +000058LOCAL_PACKAGE_NAME := NeuralNetworksApiBenchmark
Bob Badoure6cb0912021-04-23 16:15:07 -070059LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
60LOCAL_LICENSE_CONDITIONS := notice
61LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Przemyslaw Szczepaniaka8ff13f2018-05-17 14:19:44 +010062include $(BUILD_PACKAGE)
Viet Dangab62f602018-12-11 17:07:17 +000063
Viet Dang1f0f4402019-01-09 17:41:26 +000064include $(CLEAR_VARS)
Stefano Galarraga650bda52020-06-17 11:03:07 +010065
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)
Stefano Galarraga731fc142021-10-18 17:34:25 +010073LOCAL_JNI_SHARED_LIBRARIES := libnnbenchmark_jni libsupport_library_jni librandom_graph_test_jni $(SL_LIBS)
Stefano Galarraga650bda52020-06-17 11:03:07 +010074
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
Ian Hua7ec0f3c2022-02-23 16:15:37 +000084SL_PREBUILT_METADATA_DIR := $(LOCAL_PATH)/sl_prebuilt/assets
85ifneq ($(wildcard $(SL_PREBUILT_METADATA_DIR)),)
86LOCAL_ASSET_DIR += $(SL_PREBUILT_METADATA_DIR)
87endif
88
Stefano Galarraga650bda52020-06-17 11:03:07 +010089LOCAL_PACKAGE_NAME := NeuralNetworksApiCrashTest
Bob Badoure6cb0912021-04-23 16:15:07 -070090LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
91LOCAL_LICENSE_CONDITIONS := notice
92LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
Stefano Galarraga650bda52020-06-17 11:03:07 +010093include $(BUILD_PACKAGE)
94
Viet Dangab62f602018-12-11 17:07:17 +000095include $(call all-makefiles-under,$(LOCAL_PATH))