Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | include $(call all-subdir-makefiles) |
| 20 | |
| 21 | ifeq ($(HOST_OS),linux) |
| 22 | |
Todd Lee | 1eb5728 | 2017-06-08 14:07:17 -0700 | [diff] [blame] | 23 | # general Android Conntectivity Test Suite |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 24 | ACTS_DISTRO := $(HOST_OUT)/acts-dist/acts.zip |
| 25 | |
markdr | 0ccb83e | 2017-11-16 15:15:21 -0800 | [diff] [blame] | 26 | $(ACTS_DISTRO): $(sort $(shell find $(LOCAL_PATH)/acts)) |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 27 | @echo "Packaging ACTS into $(ACTS_DISTRO)" |
| 28 | @mkdir -p $(HOST_OUT)/acts-dist/ |
| 29 | @rm -f $(HOST_OUT)/acts-dist/acts.zip |
markdr | 0ccb83e | 2017-11-16 15:15:21 -0800 | [diff] [blame] | 30 | $(hide) zip $(HOST_OUT)/acts-dist/acts.zip $(shell find tools/test/connectivity/acts/* ! -wholename "*__pycache__*") |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 31 | acts: $(ACTS_DISTRO) |
Dan Willemsen | 972c6ba | 2018-07-24 14:28:12 -0700 | [diff] [blame] | 32 | .PHONY: acts |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 33 | |
Dan Willemsen | c59a9c6 | 2019-05-06 13:54:47 -0700 | [diff] [blame] | 34 | $(call dist-for-goals,acts tests,$(ACTS_DISTRO)) |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 35 | |
Todd Lee | 1eb5728 | 2017-06-08 14:07:17 -0700 | [diff] [blame] | 36 | # Wear specific Android Connectivity Test Suite |
| 37 | WTS_ACTS_DISTRO_DIR := $(HOST_OUT)/wts-acts-dist |
| 38 | WTS_ACTS_DISTRO := $(WTS_ACTS_DISTRO_DIR)/wts-acts |
| 39 | WTS_ACTS_DISTRO_ARCHIVE := $(WTS_ACTS_DISTRO_DIR)/wts-acts.zip |
| 40 | WTS_LOCAL_ACTS_DIR := tools/test/connectivity/acts/framework/acts/ |
| 41 | |
| 42 | $(WTS_ACTS_DISTRO): $(SOONG_ZIP) |
| 43 | @echo "Packaging WTS-ACTS into $(WTS_ACTS_DISTRO)" |
| 44 | # clean-up and mkdir for dist |
| 45 | @rm -Rf $(WTS_ACTS_DISTRO_DIR) |
| 46 | @mkdir -p $(WTS_ACTS_DISTRO_DIR) |
| 47 | # grab the files from local acts framework and zip them up |
| 48 | $(hide) find $(WTS_LOCAL_ACTS_DIR) | sort >$@.list |
Todd Lee | 725f690 | 2017-06-09 16:02:14 -0700 | [diff] [blame] | 49 | $(hide) $(SOONG_ZIP) -d -P acts -o $(WTS_ACTS_DISTRO_ARCHIVE) -C tools/test/connectivity/acts/framework/acts/ -l $@.list |
Todd Lee | 1eb5728 | 2017-06-08 14:07:17 -0700 | [diff] [blame] | 50 | # add in the local wts py files for use with the prebuilt |
| 51 | $(hide) zip -r $(WTS_ACTS_DISTRO_ARCHIVE) -j tools/test/connectivity/wts-acts/*.py |
| 52 | # create executable tool from the archive |
| 53 | $(hide) echo '#!/usr/bin/env python' | cat - $(WTS_ACTS_DISTRO_DIR)/wts-acts.zip > $(WTS_ACTS_DISTRO_DIR)/wts-acts |
| 54 | $(hide) chmod 755 $(WTS_ACTS_DISTRO) |
| 55 | |
| 56 | wts-acts: $(WTS_ACTS_DISTRO) |
Dan Willemsen | 972c6ba | 2018-07-24 14:28:12 -0700 | [diff] [blame] | 57 | .PHONY: wts-acts |
Todd Lee | 1eb5728 | 2017-06-08 14:07:17 -0700 | [diff] [blame] | 58 | |
Dan Willemsen | c59a9c6 | 2019-05-06 13:54:47 -0700 | [diff] [blame] | 59 | $(call dist-for-goals,wts-acts tests,$(WTS_ACTS_DISTRO)) |
Todd Lee | 1eb5728 | 2017-06-08 14:07:17 -0700 | [diff] [blame] | 60 | |
| 61 | |
| 62 | |
Ang Li | bfc05da | 2016-06-22 17:44:25 -0700 | [diff] [blame] | 63 | endif |