blob: 6e156082c77d008c3beff08f009fefe767db13d8 [file] [log] [blame]
Keun Soo Yimaad76ca2016-02-24 15:46:21 -08001#
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
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070017LOCAL_PATH := $(call my-dir)
18
Keun Soo Yimaad76ca2016-02-24 15:46:21 -080019include $(call all-subdir-makefiles)
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070020
21ifeq ($(HOST_OS),linux)
Keun Soo Yim524aca62016-07-10 21:56:09 -070022ifneq ($(filter vts, $(MAKECMDGOALS)),)
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070023
24include $(CLEAR_VARS)
25
Keun Soo Yim9525e832016-06-22 15:42:52 -070026VTS_PYTHON_ZIP := $(HOST_OUT)/vts_runner_python/vts_runner_python.zip
Yin-Chia Yeha005eef2016-10-03 19:04:10 -070027VTS_CAMERAITS_ZIP := $(HOST_OUT)/vts/CameraITS.zip
Keun Soo Yim6ed72c72016-08-30 14:40:47 -070028VTS_TESTCASES_OUT := $(HOST_OUT)/vts/android-vts/testcases
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070029
Yin-Chia Yeha005eef2016-10-03 19:04:10 -070030.PHONY: $(VTS_PYTHON_ZIP) $(VTS_CAMERAITS_ZIP)
Keun Soo Yim9600b7f2016-08-22 12:51:19 -070031$(VTS_PYTHON_ZIP): $(SOONG_ZIP)
Keun Soo Yim550214e2016-06-16 18:52:00 -070032 @echo "build vts python package: $(VTS_PYTHON_ZIP)"
Keun Soo Yim949027d2016-08-30 23:16:03 -070033 $(hide) mkdir -p $(dir $@)
Keun Soo Yimdcf20942016-08-19 10:12:38 -070034 @rm -f $@.list
Yuexi Maf7e57712016-09-01 10:49:28 -070035 $(hide) find test -name '*.py' -or -name '*.config' -or -name '*.push' | sort > $@.list
Keun Soo Yimdcf20942016-08-19 10:12:38 -070036 $(hide) $(SOONG_ZIP) -d -o $@ -C test -l $@.list
37 @rm -f $@.list
Keun Soo Yim6ed72c72016-08-30 14:40:47 -070038 $(hide) rm -rf $(VTS_TESTCASES_OUT)/vts
39 $(hide) unzip $@ -d $(VTS_TESTCASES_OUT)
40 $(hide) touch -f $(VTS_TESTCASES_OUT)/vts/__init__.py
41
Yin-Chia Yeha005eef2016-10-03 19:04:10 -070042$(VTS_CAMERAITS_ZIP): $(SOONG_ZIP)
43 @echo "build vts CameraITS package: $(VTS_CAMERAITS_ZIP)"
44 $(hide) find cts/apps/CameraITS -name '*.py' -or -name '*.pdf' -or -name '*.png' | sort > $@.list
45 $(hide) $(SOONG_ZIP) -d -o $@ -C cts/apps/CameraITS -l $@.list
46 @rm -f $@.list
47 $(hide) mkdir -p $(VTS_TESTCASES_OUT)/CameraITS
48 $(hide) rm -rf $(VTS_TESTCASES_OUT)/CameraITS/*
49 $(hide) unzip $@ -d $(VTS_TESTCASES_OUT)/CameraITS
50
Keun Soo Yimaa989df2016-08-27 12:21:51 -070051.PHONY: vts
Yin-Chia Yeha005eef2016-10-03 19:04:10 -070052vts: $(VTS_PYTHON_ZIP) $(VTS_CAMERAITS_ZIP)
Keun Soo Yim8be842f2016-06-23 14:00:01 -070053
Keun Soo Yim524aca62016-07-10 21:56:09 -070054endif # vts
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070055endif # linux