Home | History | Annotate | Download | only in perf-setup
      1 #
      2 # Copyright (C) 2016 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 
     17 # Rules to generate setup script for device perf tests
     18 # Different devices may share the same script. To add a new script, define a
     19 # new variable named <device name>_script, pointing at the script in current
     20 # source folder.
     21 # At execution time, scripts will be pushed onto device and run with root
     22 # identity
     23 
     24 LOCAL_PATH:= $(call my-dir)
     25 
     26 # only define the target if a perf setup script is defined by the BoardConfig
     27 # of the device we are building.
     28 #
     29 # To add a new script:
     30 # 1. add a new setup script suitable for the device at:
     31 #    platform_testing/scripts/perf-setup/
     32 # 2. modify BoardConfig.mk of the corresponding device under:
     33 #    device/<OEM name>/<device name/
     34 # 3. add variable "BOARD_PERFSETUP_SCRIPT", and point it at the path to the new
     35 #    perf setup script; the path should be relative to the build root
     36 ifneq ($(strip $(BOARD_PERFSETUP_SCRIPT)),)
     37 
     38 include $(CLEAR_VARS)
     39 LOCAL_MODULE := perf-setup.sh
     40 LOCAL_MODULE_CLASS := EXECUTABLES
     41 LOCAL_MODULE_TAGS := optional
     42 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
     43 LOCAL_PREBUILT_MODULE_FILE := $(BOARD_PERFSETUP_SCRIPT)
     44 LOCAL_COMPATIBILITY_SUITE := device-tests
     45 include $(BUILD_PREBUILT)
     46 
     47 endif
     48