blob: 0b8135ea8f183c2977b8e033caf50beb2c55584d [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
Keun Soo Yim6ed72c72016-08-30 14:40:47 -070027VTS_TESTCASES_OUT := $(HOST_OUT)/vts/android-vts/testcases
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070028
Keun Soo Yimaa989df2016-08-27 12:21:51 -070029.PHONY: $(VTS_PYTHON_ZIP)
Keun Soo Yim9600b7f2016-08-22 12:51:19 -070030$(VTS_PYTHON_ZIP): $(SOONG_ZIP)
Keun Soo Yim550214e2016-06-16 18:52:00 -070031 @echo "build vts python package: $(VTS_PYTHON_ZIP)"
Keun Soo Yim949027d2016-08-30 23:16:03 -070032 $(hide) mkdir -p $(dir $@)
Keun Soo Yimdcf20942016-08-19 10:12:38 -070033 @rm -f $@.list
Yuexi Maf7e57712016-09-01 10:49:28 -070034 $(hide) find test -name '*.py' -or -name '*.config' -or -name '*.push' | sort > $@.list
Keun Soo Yimdcf20942016-08-19 10:12:38 -070035 $(hide) $(SOONG_ZIP) -d -o $@ -C test -l $@.list
36 @rm -f $@.list
Keun Soo Yim6ed72c72016-08-30 14:40:47 -070037 $(hide) rm -rf $(VTS_TESTCASES_OUT)/vts
38 $(hide) unzip $@ -d $(VTS_TESTCASES_OUT)
39 $(hide) touch -f $(VTS_TESTCASES_OUT)/vts/__init__.py
40
Keun Soo Yimaa989df2016-08-27 12:21:51 -070041.PHONY: vts
Keun Soo Yim29cb15b2016-08-30 23:49:37 -070042vts: $(VTS_PYTHON_ZIP)
Keun Soo Yim8be842f2016-06-23 14:00:01 -070043
Keun Soo Yim524aca62016-07-10 21:56:09 -070044endif # vts
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070045endif # linux