10704ebd2Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 20704ebd2Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30704ebd2Sopenharmony_ci# you may not use this file except in compliance with the License. 40704ebd2Sopenharmony_ci# You may obtain a copy of the License at 50704ebd2Sopenharmony_ci# 60704ebd2Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70704ebd2Sopenharmony_ci# 80704ebd2Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90704ebd2Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100704ebd2Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110704ebd2Sopenharmony_ci# See the License for the specific language governing permissions and 120704ebd2Sopenharmony_ci# limitations under the License. 130704ebd2Sopenharmony_ci 140704ebd2Sopenharmony_ciimport("//test/xts/tools/build/suite.gni") 150704ebd2Sopenharmony_ci 160704ebd2Sopenharmony_ci_all_test_packages = [ 170704ebd2Sopenharmony_ci "${DCTS_ROOT}/distributedhardware:distributedhardware", 180704ebd2Sopenharmony_ci "${DCTS_ROOT}/distributeddatamgr:distributeddatatest", 190704ebd2Sopenharmony_ci "${DCTS_ROOT}/communication:communication", 200704ebd2Sopenharmony_ci "${DCTS_ROOT}/filemanagement:filemanagement", 210704ebd2Sopenharmony_ci "${DCTS_ROOT}/ability:ability", 220704ebd2Sopenharmony_ci "${DCTS_ROOT}/multimedia:multimedia", 230704ebd2Sopenharmony_ci] 240704ebd2Sopenharmony_ci 250704ebd2Sopenharmony_ci_all_test_packages_ivi = [ 260704ebd2Sopenharmony_ci # add dcts for ivi here 270704ebd2Sopenharmony_ci # "${DCTS_ROOT}/multimedia:multimedia_ivi", 280704ebd2Sopenharmony_ci] 290704ebd2Sopenharmony_ci 300704ebd2Sopenharmony_ci_all_test_packages_intellitv = [ 310704ebd2Sopenharmony_ci # add dcts for intellitv here 320704ebd2Sopenharmony_ci #"${DCTS_ROOT}/multimedia:multimedia_intellitv", 330704ebd2Sopenharmony_ci] 340704ebd2Sopenharmony_ci 350704ebd2Sopenharmony_ci_all_test_packages_wearable = [ 360704ebd2Sopenharmony_ci # add dcts for wearable here 370704ebd2Sopenharmony_ci #"${DCTS_ROOT}/multimedia:multimedia_wearable", 380704ebd2Sopenharmony_ci] 390704ebd2Sopenharmony_ci 400704ebd2Sopenharmony_ciselected_packages_wearable = [] 410704ebd2Sopenharmony_ciselected_packages_intellitv = [] 420704ebd2Sopenharmony_ciselected_packages_ivi = [] 430704ebd2Sopenharmony_ciselected_packages = [] 440704ebd2Sopenharmony_ciassert(XTS_SUITENAME != "") 450704ebd2Sopenharmony_ciif (build_xts == true && XTS_SUITENAME == "dcts") { 460704ebd2Sopenharmony_ci _select_script = "//test/xts/tools/build/test_package_select.py" 470704ebd2Sopenharmony_ci _subsystem_config_path = rebase_path( 480704ebd2Sopenharmony_ci "$root_build_dir/build_configs/subsystem_info/src_subsystem_info.json") 490704ebd2Sopenharmony_ci _select_args = [ _subsystem_config_path ] + _all_test_packages 500704ebd2Sopenharmony_ci _select_args_ivi = [ _subsystem_config_path ] + _all_test_packages_ivi 510704ebd2Sopenharmony_ci _select_args_intellitv = 520704ebd2Sopenharmony_ci [ _subsystem_config_path ] + _all_test_packages_intellitv 530704ebd2Sopenharmony_ci _select_args_wearable = 540704ebd2Sopenharmony_ci [ _subsystem_config_path ] + _all_test_packages_wearable 550704ebd2Sopenharmony_ci _target_subsystem = getenv("target_subsystem") 560704ebd2Sopenharmony_ci 570704ebd2Sopenharmony_ci if (_target_subsystem != "" && _target_subsystem != "all") { 580704ebd2Sopenharmony_ci print("Build dcts, target_subsystem=" + _target_subsystem) 590704ebd2Sopenharmony_ci _select_args += [ "selected_subsystem=" + _target_subsystem ] 600704ebd2Sopenharmony_ci _select_args_ivi += [ "selected_subsystem=" + _target_subsystem ] 610704ebd2Sopenharmony_ci _select_args_intellitv += [ "selected_subsystem=" + _target_subsystem ] 620704ebd2Sopenharmony_ci _select_args_wearable += [ "selected_subsystem=" + _target_subsystem ] 630704ebd2Sopenharmony_ci } 640704ebd2Sopenharmony_ci 650704ebd2Sopenharmony_ci selected_packages = exec_script(_select_script, _select_args, "list lines") 660704ebd2Sopenharmony_ci 670704ebd2Sopenharmony_ci selected_packages_ivi = 680704ebd2Sopenharmony_ci exec_script(_select_script, _select_args_ivi, "list lines") 690704ebd2Sopenharmony_ci 700704ebd2Sopenharmony_ci selected_packages_intellitv = 710704ebd2Sopenharmony_ci exec_script(_select_script, _select_args_intellitv, "list lines") 720704ebd2Sopenharmony_ci 730704ebd2Sopenharmony_ci selected_packages_wearable = 740704ebd2Sopenharmony_ci exec_script(_select_script, _select_args_wearable, "list lines") 750704ebd2Sopenharmony_ci 760704ebd2Sopenharmony_ci print("Selected packages:") 770704ebd2Sopenharmony_ci print(selected_packages) 780704ebd2Sopenharmony_ci 790704ebd2Sopenharmony_ci # always include testtools 800704ebd2Sopenharmony_ci selected_packages += [ "testtools:deploy_testtools" ] 810704ebd2Sopenharmony_ci selected_packages += [ "${XTS_ROOT}/tools/others/query:libQuery" ] 820704ebd2Sopenharmony_ci selected_packages_ivi += [ "testtools:deploy_testtools" ] 830704ebd2Sopenharmony_ci selected_packages_intellitv += [ "testtools:deploy_testtools" ] 840704ebd2Sopenharmony_ci selected_packages_wearable += [ "testtools:deploy_testtools" ] 850704ebd2Sopenharmony_ci} else { 860704ebd2Sopenharmony_ci print("DCTS build is not enabled") 870704ebd2Sopenharmony_ci} 88