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 | 6ed72c7 | 2016-08-30 14:40:47 -0700 | [diff] [blame] | 27 | VTS_TESTCASES_OUT := $(HOST_OUT)/vts/android-vts/testcases |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 28 | |
Keun Soo Yim | aa989df | 2016-08-27 12:21:51 -0700 | [diff] [blame] | 29 | .PHONY: $(VTS_PYTHON_ZIP) |
Keun Soo Yim | 9600b7f | 2016-08-22 12:51:19 -0700 | [diff] [blame] | 30 | $(VTS_PYTHON_ZIP): $(SOONG_ZIP) |
Keun Soo Yim | 550214e | 2016-06-16 18:52:00 -0700 | [diff] [blame] | 31 | @echo "build vts python package: $(VTS_PYTHON_ZIP)" |
Keun Soo Yim | 949027d | 2016-08-30 23:16:03 -0700 | [diff] [blame] | 32 | $(hide) mkdir -p $(dir $@) |
Keun Soo Yim | dcf2094 | 2016-08-19 10:12:38 -0700 | [diff] [blame] | 33 | @rm -f $@.list |
Yuexi Ma | f7e5771 | 2016-09-01 10:49:28 -0700 | [diff] [blame] | 34 | $(hide) find test -name '*.py' -or -name '*.config' -or -name '*.push' | sort > $@.list |
Keun Soo Yim | dcf2094 | 2016-08-19 10:12:38 -0700 | [diff] [blame] | 35 | $(hide) $(SOONG_ZIP) -d -o $@ -C test -l $@.list |
| 36 | @rm -f $@.list |
Keun Soo Yim | 6ed72c7 | 2016-08-30 14:40:47 -0700 | [diff] [blame] | 37 | $(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 Yim | aa989df | 2016-08-27 12:21:51 -0700 | [diff] [blame] | 41 | .PHONY: vts |
Keun Soo Yim | 29cb15b | 2016-08-30 23:49:37 -0700 | [diff] [blame] | 42 | vts: $(VTS_PYTHON_ZIP) |
Keun Soo Yim | 8be842f | 2016-06-23 14:00:01 -0700 | [diff] [blame] | 43 | |
Keun Soo Yim | 524aca6 | 2016-07-10 21:56:09 -0700 | [diff] [blame] | 44 | endif # vts |
Keun Soo Yim | 7d30cce | 2016-05-25 13:10:13 -0700 | [diff] [blame] | 45 | endif # linux |