Keun Soo Yim | aad76ca | 2016-02-24 15:46:21 -0800 | [diff] [blame] | 1 | # |
| 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 Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Keun Soo Yim | aad76ca | 2016-02-24 15:46:21 -0800 | [diff] [blame] | 19 | include $(call all-subdir-makefiles) |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 20 | |
| 21 | ifeq ($(HOST_OS),linux) |
Keun Soo Yim | 524aca6 | 2016-07-10 21:56:09 -0700 | [diff] [blame] | 22 | ifneq ($(filter vts, $(MAKECMDGOALS)),) |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 23 | |
| 24 | include $(CLEAR_VARS) |
| 25 | |
Keun Soo Yim | 9525e83 | 2016-06-22 15:42:52 -0700 | [diff] [blame] | 26 | VTS_PYTHON_ZIP := $(HOST_OUT)/vts_runner_python/vts_runner_python.zip |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 27 | |
Keun Soo Yim | 550214e | 2016-06-16 18:52:00 -0700 | [diff] [blame] | 28 | $(VTS_PYTHON_ZIP): test/vts/setup.py |
| 29 | @echo "build vts python package: $(VTS_PYTHON_ZIP)" |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 30 | @mkdir -p $(dir $@) |
Keun Soo Yim | 550214e | 2016-06-16 18:52:00 -0700 | [diff] [blame] | 31 | $(hide) cd test/vts; python setup.py sdist --formats=zip |
Keun Soo Yim | 524aca6 | 2016-07-10 21:56:09 -0700 | [diff] [blame] | 32 | $(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 Yim | 550214e | 2016-06-16 18:52:00 -0700 | [diff] [blame] | 35 | $(hide) cp -f test/vts/dist/vts-0.1.zip $@ |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 36 | |
Keun Soo Yim | 9525e83 | 2016-06-22 15:42:52 -0700 | [diff] [blame] | 37 | .PHONY: vts_runner_python |
| 38 | vts_runner_python: $(VTS_PYTHON_ZIP) |
Keun Soo Yim | 550214e | 2016-06-16 18:52:00 -0700 | [diff] [blame] | 39 | vts: $(VTS_PYTHON_ZIP) |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 40 | |
Keun Soo Yim | 524aca6 | 2016-07-10 21:56:09 -0700 | [diff] [blame] | 41 | $(call dist-for-goals,vts,$(VTS_PYTHON_ZIP)) |
Keun Soo Yim | 8be842f | 2016-06-23 14:00:01 -0700 | [diff] [blame] | 42 | |
Keun Soo Yim | 524aca6 | 2016-07-10 21:56:09 -0700 | [diff] [blame] | 43 | endif # vts |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 44 | endif # linux |