blob: 11b923be6f4f7f4fa8b6a52ee4a370064cc2d08e [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)
32
33$(call dist-for-goals,tests,$(ACTS_DISTRO))
34
Todd Lee1eb57282017-06-08 14:07:17 -070035# Wear specific Android Connectivity Test Suite
36WTS_ACTS_DISTRO_DIR := $(HOST_OUT)/wts-acts-dist
37WTS_ACTS_DISTRO := $(WTS_ACTS_DISTRO_DIR)/wts-acts
38WTS_ACTS_DISTRO_ARCHIVE := $(WTS_ACTS_DISTRO_DIR)/wts-acts.zip
39WTS_LOCAL_ACTS_DIR := tools/test/connectivity/acts/framework/acts/
40
41$(WTS_ACTS_DISTRO): $(SOONG_ZIP)
42 @echo "Packaging WTS-ACTS into $(WTS_ACTS_DISTRO)"
43 # clean-up and mkdir for dist
44 @rm -Rf $(WTS_ACTS_DISTRO_DIR)
45 @mkdir -p $(WTS_ACTS_DISTRO_DIR)
46 # grab the files from local acts framework and zip them up
47 $(hide) find $(WTS_LOCAL_ACTS_DIR) | sort >$@.list
Todd Lee725f6902017-06-09 16:02:14 -070048 $(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 -070049 # add in the local wts py files for use with the prebuilt
50 $(hide) zip -r $(WTS_ACTS_DISTRO_ARCHIVE) -j tools/test/connectivity/wts-acts/*.py
51 # create executable tool from the archive
52 $(hide) echo '#!/usr/bin/env python' | cat - $(WTS_ACTS_DISTRO_DIR)/wts-acts.zip > $(WTS_ACTS_DISTRO_DIR)/wts-acts
53 $(hide) chmod 755 $(WTS_ACTS_DISTRO)
54
55wts-acts: $(WTS_ACTS_DISTRO)
56
57$(call dist-for-goals,tests,$(WTS_ACTS_DISTRO))
58
59
60
Ang Libfc05da2016-06-22 17:44:25 -070061endif