1 # Copyright (C) 2015 The Android Open Source Project 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 # 16 # Builds a compatibility test suite. 17 # 18 19 # Generate the SuiteInfo.java 20 suite_info_java := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON)/com/android/compatibility/SuiteInfo.java 21 $(suite_info_java): PRIVATE_SUITE_BUILD_NUMBER := $(LOCAL_SUITE_BUILD_NUMBER) 22 $(suite_info_java): PRIVATE_SUITE_TARGET_ARCH := $(LOCAL_SUITE_TARGET_ARCH) 23 $(suite_info_java): PRIVATE_SUITE_NAME := $(LOCAL_SUITE_NAME) 24 $(suite_info_java): PRIVATE_SUITE_FULLNAME := $(LOCAL_SUITE_FULLNAME) 25 $(suite_info_java): PRIVATE_SUITE_VERSION := $(LOCAL_SUITE_VERSION) 26 $(suite_info_java): cts/build/compatibility_test_suite.mk $(LOCAL_MODULE_MAKEFILE) 27 @echo Generating: $@ 28 $(hide) mkdir -p $(dir $@) 29 $(hide) echo "/* This file is auto generated by Android.mk. Do not modify. */" > $@ 30 $(hide) echo "package com.android.compatibility;" >> $@ 31 $(hide) echo "public class SuiteInfo {" >> $@ 32 $(hide) echo " public static final String BUILD_NUMBER = \"$(PRIVATE_SUITE_BUILD_NUMBER)\";" >> $@ 33 $(hide) echo " public static final String TARGET_ARCH = \"$(PRIVATE_SUITE_TARGET_ARCH)\";" >> $@ 34 $(hide) echo " public static final String NAME = \"$(PRIVATE_SUITE_NAME)\";" >> $@ 35 $(hide) echo " public static final String FULLNAME = \"$(PRIVATE_SUITE_FULLNAME)\";" >> $@ 36 $(hide) echo " public static final String VERSION = \"$(PRIVATE_SUITE_VERSION)\";" >> $@ 37 $(hide) echo "}" >> $@ 38 39 # Reset variables 40 LOCAL_SUITE_BUILD_NUMBER := 41 LOCAL_SUITE_NAME := 42 LOCAL_SUITE_FULLNAME := 43 LOCAL_SUITE_VERSION := 44 45 # Include the SuiteInfo.java 46 LOCAL_GENERATED_SOURCES := $(suite_info_java) 47 48 # Add the base libraries 49 LOCAL_JAVA_LIBRARIES += tradefed-prebuilt hosttestlib compatibility-host-util 50 51 LOCAL_MODULE_TAGS := optional 52 53 include $(BUILD_HOST_JAVA_LIBRARY) 54