Home | History | Annotate | Download | only in build
      1 #
      2 # Copyright (C) 2018 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 $(CLEAR_VARS)
     20 
     21 VTSLAB_OUT_ROOT := $(HOST_OUT)/vtslab
     22 VTSLAB_TESTCASES_OUT := $(VTSLAB_OUT_ROOT)/android-vtslab/testcases
     23 VTSLAB_TOOLS_OUT := $(VTSLAB_OUT_ROOT)/android-vtslab/tools
     24 
     25 # Packaging rule for android-vtslab.zip
     26 test_suite_name := vtslab
     27 test_suite_readme := test/framework/README.md
     28 
     29 include $(LOCAL_PATH)/package.mk
     30 include test/vts/tools/build/utils/vts_package_utils.mk
     31 
     32 vts_lab_required_packages: run adb fastboot
     33 	echo "radio $(ALL_MODULES.WifiUtil.BUILT_INSTALLED)"
     34 
     35 .PHONY: vtslab
     36 vtslab: $(compatibility_zip) $(vts_lab_required_packages)
     37 $(call dist-for-goals, vtslab, $(compatibility_zip))
     38 
     39 
     40 host_hc_files := \
     41   $(call find-files-in-subdirs,test/framework/harnesses/host_controller,"*.py" -and -type f,.)
     42 
     43 host_hc_copy_pairs := \
     44   $(foreach f,$(host_hc_files),\
     45       test/framework/harnesses/host_controller/$(f):$(VTSLAB_TESTCASES_OUT)/host_controller/$(f))
     46 
     47 host_hc_extra_copy_pairs := \
     48   test/framework/tools/host_controller/run:$(VTSLAB_TOOLS_OUT)/run \
     49 
     50 host_acloud_files := \
     51   $(call find-files-in-subdirs,tools/acloud,"*.py" -and -type f,.) \
     52   $(call find-files-in-subdirs,tools/acloud,"*.config" -and -type f,.)
     53 
     54 host_acloud_copy_pairs := \
     55   $(foreach f,$(host_acloud_files),\
     56     tools/acloud/$(f):$(VTSLAB_TESTCASES_OUT)/acloud/$(f))
     57 
     58 host_vti_proto_files := \
     59   $(call find-files-in-subdirs,test/vti/test_serving/proto,"*.py" -and -type f,.)
     60 
     61 host_vti_proto_copy_pairs := \
     62   $(foreach f,$(host_vti_proto_files),\
     63     test/vti/test_serving/proto/$(f):$(VTSLAB_TESTCASES_OUT)/vti/test_serving/proto/$(f))
     64 
     65 $(VTSLAB_TESTCASES_OUT)/vti/test_serving/__init__.py:
     66 	@mkdir -p $(VTSLAB_TESTCASES_OUT)/vti/test_serving
     67 	@touch $(VTSLAB_TESTCASES_OUT)/vti/test_serving/__init__.py
     68 
     69 $(VTSLAB_TESTCASES_OUT)/vti/__init__.py:
     70 	@mkdir -p $(VTSLAB_TESTCASES_OUT)/vti
     71 	@touch $(VTSLAB_TESTCASES_OUT)/vti/__init__.py
     72 
     73 host_vti_extra_copy_pairs := \
     74   $(VTSLAB_TESTCASES_OUT)/vti/__init__.py \
     75   $(VTSLAB_TESTCASES_OUT)/vti/test_serving/__init__.py \
     76 
     77 vts_host_python_files := \
     78   $(call find-files-in-subdirs,test/vts,"*.py" -and -type f,.)
     79 
     80 vts_host_python_copy_pairs := \
     81   $(foreach f,$(vts_host_python_files),\
     82     test/vts/$(f):$(VTSLAB_TESTCASES_OUT)/vts/$(f))
     83 
     84 vtslab_apk_modules := \
     85   WifiUtil \
     86   CtsVerifier \
     87 
     88 vtslab_copy_pairs := \
     89   $(call copy-many-files,$(vtslab_apk_modules)) \
     90   $(call copy-many-files,$(host_hc_copy_pairs)) \
     91   $(call copy-many-files,$(host_hc_extra_copy_pairs)) \
     92   $(call copy-many-files,$(host_acloud_copy_pairs)) \
     93   $(call copy-many-files,$(host_vti_proto_copy_pairs)) \
     94   $(call copy-many-files,$(vts_host_python_copy_pairs)) \
     95   $(host_vti_extra_copy_pairs) \
     96 
     97 $(compatibility_zip): $(vtslab_copy_pairs)
     98 
     99