blob: eee4d29ac9f306f8e95e29d4a4207a9fbae5b4d5 [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 Yim7d30cce2016-05-25 13:10:13 -070027
Keun Soo Yim550214e2016-06-16 18:52:00 -070028$(VTS_PYTHON_ZIP): test/vts/setup.py
29 @echo "build vts python package: $(VTS_PYTHON_ZIP)"
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070030 @mkdir -p $(dir $@)
Keun Soo Yim550214e2016-06-16 18:52:00 -070031 $(hide) cd test/vts; python setup.py sdist --formats=zip
Keun Soo Yim524aca62016-07-10 21:56:09 -070032 $(hide) unzip test/vts/dist/vts-0.1.zip -d $(HOST_OUT)/vts/android-vts/testcases
33 $(hide) mv -f $(HOST_OUT)/vts/android-vts/testcases/vts-0.1 $(HOST_OUT)/vts/android-vts/testcases/vts
34 $(hide) touch -f $(HOST_OUT)/vts/android-vts/testcases/vts/__init__.py
Keun Soo Yim550214e2016-06-16 18:52:00 -070035 $(hide) cp -f test/vts/dist/vts-0.1.zip $@
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070036
Keun Soo Yim9525e832016-06-22 15:42:52 -070037.PHONY: vts_runner_python
38vts_runner_python: $(VTS_PYTHON_ZIP)
Keun Soo Yim550214e2016-06-16 18:52:00 -070039vts: $(VTS_PYTHON_ZIP)
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070040
Keun Soo Yim524aca62016-07-10 21:56:09 -070041$(call dist-for-goals,vts,$(VTS_PYTHON_ZIP))
Keun Soo Yim8be842f2016-06-23 14:00:01 -070042
Keun Soo Yim524aca62016-07-10 21:56:09 -070043endif # vts
Keun Soo Yim7d30cce2016-05-25 13:10:13 -070044endif # linux