blob: d47180c95f1912c00487b57bf073422e8e68b3c9 [file] [log] [blame]
Ang Libfc05da2016-06-22 17:44:25 -07001#
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
17LOCAL_PATH := $(call my-dir)
18
19include $(call all-subdir-makefiles)
20
21ifeq ($(HOST_OS),linux)
22
Todd Lee1eb57282017-06-08 14:07:17 -070023# general Android Conntectivity Test Suite
Ang Libfc05da2016-06-22 17:44:25 -070024ACTS_DISTRO := $(HOST_OUT)/acts-dist/acts.zip
25
markdr0ccb83e2017-11-16 15:15:21 -080026$(ACTS_DISTRO): $(sort $(shell find $(LOCAL_PATH)/acts))
Ang Libfc05da2016-06-22 17:44:25 -070027 @echo "Packaging ACTS into $(ACTS_DISTRO)"
28 @mkdir -p $(HOST_OUT)/acts-dist/
29 @rm -f $(HOST_OUT)/acts-dist/acts.zip
markdr0ccb83e2017-11-16 15:15:21 -080030 $(hide) zip $(HOST_OUT)/acts-dist/acts.zip $(shell find tools/test/connectivity/acts/* ! -wholename "*__pycache__*")
Ang Libfc05da2016-06-22 17:44:25 -070031acts: $(ACTS_DISTRO)
Dan Willemsen972c6ba2018-07-24 14:28:12 -070032.PHONY: acts
Ang Libfc05da2016-06-22 17:44:25 -070033
Dan Willemsend4204692019-05-06 13:54:47 -070034$(call dist-for-goals,acts tests,$(ACTS_DISTRO))
Ang Libfc05da2016-06-22 17:44:25 -070035
Todd Lee1eb57282017-06-08 14:07:17 -070036# Wear specific Android Connectivity Test Suite
37WTS_ACTS_DISTRO_DIR := $(HOST_OUT)/wts-acts-dist
38WTS_ACTS_DISTRO := $(WTS_ACTS_DISTRO_DIR)/wts-acts
39WTS_ACTS_DISTRO_ARCHIVE := $(WTS_ACTS_DISTRO_DIR)/wts-acts.zip
40WTS_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 Lee725f6902017-06-09 16:02:14 -070049 $(hide) $(SOONG_ZIP) -d -P acts -o $(WTS_ACTS_DISTRO_ARCHIVE) -C tools/test/connectivity/acts/framework/acts/ -l $@.list
Todd Lee1eb57282017-06-08 14:07:17 -070050 # 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
56wts-acts: $(WTS_ACTS_DISTRO)
Dan Willemsen972c6ba2018-07-24 14:28:12 -070057.PHONY: wts-acts
Todd Lee1eb57282017-06-08 14:07:17 -070058
Dan Willemsend4204692019-05-06 13:54:47 -070059$(call dist-for-goals,wts-acts tests,$(WTS_ACTS_DISTRO))
Todd Lee1eb57282017-06-08 14:07:17 -070060
61
62
Ang Libfc05da2016-06-22 17:44:25 -070063endif