1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//test/xts/tools/build/suite.gni") 15 16_all_test_packages = [ 17 "${DCTS_ROOT}/distributedhardware:distributedhardware", 18 "${DCTS_ROOT}/distributeddatamgr:distributeddatatest", 19 "${DCTS_ROOT}/communication:communication", 20 "${DCTS_ROOT}/filemanagement:filemanagement", 21 "${DCTS_ROOT}/ability:ability", 22 "${DCTS_ROOT}/multimedia:multimedia", 23] 24 25_all_test_packages_ivi = [ 26 # add dcts for ivi here 27 # "${DCTS_ROOT}/multimedia:multimedia_ivi", 28] 29 30_all_test_packages_intellitv = [ 31 # add dcts for intellitv here 32 #"${DCTS_ROOT}/multimedia:multimedia_intellitv", 33] 34 35_all_test_packages_wearable = [ 36 # add dcts for wearable here 37 #"${DCTS_ROOT}/multimedia:multimedia_wearable", 38] 39 40selected_packages_wearable = [] 41selected_packages_intellitv = [] 42selected_packages_ivi = [] 43selected_packages = [] 44assert(XTS_SUITENAME != "") 45if (build_xts == true && XTS_SUITENAME == "dcts") { 46 _select_script = "//test/xts/tools/build/test_package_select.py" 47 _subsystem_config_path = rebase_path( 48 "$root_build_dir/build_configs/subsystem_info/src_subsystem_info.json") 49 _select_args = [ _subsystem_config_path ] + _all_test_packages 50 _select_args_ivi = [ _subsystem_config_path ] + _all_test_packages_ivi 51 _select_args_intellitv = 52 [ _subsystem_config_path ] + _all_test_packages_intellitv 53 _select_args_wearable = 54 [ _subsystem_config_path ] + _all_test_packages_wearable 55 _target_subsystem = getenv("target_subsystem") 56 57 if (_target_subsystem != "" && _target_subsystem != "all") { 58 print("Build dcts, target_subsystem=" + _target_subsystem) 59 _select_args += [ "selected_subsystem=" + _target_subsystem ] 60 _select_args_ivi += [ "selected_subsystem=" + _target_subsystem ] 61 _select_args_intellitv += [ "selected_subsystem=" + _target_subsystem ] 62 _select_args_wearable += [ "selected_subsystem=" + _target_subsystem ] 63 } 64 65 selected_packages = exec_script(_select_script, _select_args, "list lines") 66 67 selected_packages_ivi = 68 exec_script(_select_script, _select_args_ivi, "list lines") 69 70 selected_packages_intellitv = 71 exec_script(_select_script, _select_args_intellitv, "list lines") 72 73 selected_packages_wearable = 74 exec_script(_select_script, _select_args_wearable, "list lines") 75 76 print("Selected packages:") 77 print(selected_packages) 78 79 # always include testtools 80 selected_packages += [ "testtools:deploy_testtools" ] 81 selected_packages_ivi += [ "testtools:deploy_testtools" ] 82 selected_packages_intellitv += [ "testtools:deploy_testtools" ] 83 selected_packages_wearable += [ "testtools:deploy_testtools" ] 84} else { 85 print("DCTS build is not enabled") 86} 87