2015-06-04 02:42:39 +02:00
|
|
|
# Copyright (C) 2015 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# Package up a compatibility test suite in a zip file.
|
|
|
|
#
|
|
|
|
# Input variables:
|
|
|
|
# test_suite_name: the name of this test suite eg. cts
|
|
|
|
# test_suite_tradefed: the name of this test suite's tradefed wrapper
|
2015-12-16 00:04:01 +01:00
|
|
|
# test_suite_dynamic_config: the path to this test suite's dynamic configuration file
|
2015-06-04 02:42:39 +02:00
|
|
|
# test_suite_readme: the path to a README file for this test suite
|
|
|
|
# Output variables:
|
|
|
|
# compatibility_zip: the path to the output zip file.
|
|
|
|
|
|
|
|
out_dir := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)
|
|
|
|
test_artifacts := $(COMPATIBILITY.$(test_suite_name).FILES)
|
2015-06-09 00:04:31 +02:00
|
|
|
test_tools := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar \
|
2016-11-11 13:12:06 +01:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/tradefed.jar \
|
2015-07-23 21:56:51 +02:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/compatibility-host-util.jar \
|
2016-09-12 12:19:48 +02:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/compatibility-host-util-tests.jar \
|
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/compatibility-common-util-tests.jar \
|
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/compatibility-tradefed-tests.jar \
|
2016-12-15 01:55:40 +01:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/host-libprotobuf-java-full.jar \
|
2015-06-09 00:04:31 +02:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/$(test_suite_tradefed).jar \
|
2016-09-12 12:19:48 +02:00
|
|
|
$(HOST_OUT_JAVA_LIBRARIES)/$(test_suite_tradefed)-tests.jar \
|
2015-06-09 00:04:31 +02:00
|
|
|
$(HOST_OUT_EXECUTABLES)/$(test_suite_tradefed) \
|
|
|
|
$(test_suite_readme)
|
2015-06-04 02:42:39 +02:00
|
|
|
|
|
|
|
compatibility_zip := $(out_dir).zip
|
|
|
|
$(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name)
|
|
|
|
$(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir)
|
2015-06-09 00:04:31 +02:00
|
|
|
$(compatibility_zip): PRIVATE_TOOLS := $(test_tools)
|
2015-12-16 00:04:01 +01:00
|
|
|
$(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name)
|
|
|
|
$(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config)
|
2017-03-10 22:39:26 +01:00
|
|
|
$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP)
|
2015-06-04 02:42:39 +02:00
|
|
|
# Make dir structure
|
2015-06-10 18:25:24 +02:00
|
|
|
$(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases
|
2015-06-04 02:42:39 +02:00
|
|
|
# Copy tools
|
2015-06-09 00:04:31 +02:00
|
|
|
$(hide) $(ACP) -fp $(PRIVATE_TOOLS) $(PRIVATE_OUT_DIR)/tools
|
2015-12-16 00:04:01 +01:00
|
|
|
$(if $(PRIVATE_DYNAMIC_CONFIG),$(hide) $(ACP) -fp $(PRIVATE_DYNAMIC_CONFIG) $(PRIVATE_OUT_DIR)/testcases/$(PRIVATE_SUITE_NAME).dynamic)
|
2017-03-10 22:39:26 +01:00
|
|
|
$(hide) find $(dir $@)/$(PRIVATE_NAME) | sort >$@.list
|
|
|
|
$(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@) -l $@.list
|
2015-12-16 00:04:01 +01:00
|
|
|
|
|
|
|
# Reset all input variables
|
|
|
|
test_suite_name :=
|
|
|
|
test_suite_tradefed :=
|
|
|
|
test_suite_dynamic_config :=
|
|
|
|
test_suite_readme :=
|