blob: 7cdd220af97da5814844a983df8d6e635891cee0 [file] [log] [blame]
Stuart Scottff15fe92015-08-28 15:34:10 -07001# 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
20suite_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)
Stuart Scottfabc3152016-02-26 11:41:59 -080022$(suite_info_java): PRIVATE_SUITE_TARGET_ARCH := $(LOCAL_SUITE_TARGET_ARCH)
Stuart Scottff15fe92015-08-28 15:34:10 -070023$(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)\";" >> $@
Stuart Scottfabc3152016-02-26 11:41:59 -080033 $(hide) echo " public static final String TARGET_ARCH = \"$(PRIVATE_SUITE_TARGET_ARCH)\";" >> $@
Stuart Scottff15fe92015-08-28 15:34:10 -070034 $(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
40LOCAL_SUITE_BUILD_NUMBER :=
41LOCAL_SUITE_NAME :=
42LOCAL_SUITE_FULLNAME :=
43LOCAL_SUITE_VERSION :=
44
45# Include the SuiteInfo.java
46LOCAL_GENERATED_SOURCES := $(suite_info_java)
47
48# Add the base libraries
Julien Desprez26d92f22016-11-11 12:11:33 +000049LOCAL_JAVA_LIBRARIES += tradefed hosttestlib compatibility-host-util
Stuart Scottff15fe92015-08-28 15:34:10 -070050
51LOCAL_MODULE_TAGS := optional
52
53include $(BUILD_HOST_JAVA_LIBRARY)