test_packages.gni 4.1 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//test/xts/tools/build/suite.gni")

_all_test_packages = [
17
  "${ACTS_ROOT}/arkXtest:arkXtest",
M
mamingshuai 已提交
18
  "${ACTS_ROOT}/global:global",
H
huks  
hu-jixiang1 已提交
19
  "${ACTS_ROOT}/security:security",
H
hu-jixiang1 已提交
20
  "${ACTS_ROOT}/useriam:useriam",
M
mamingshuai 已提交
21
  "${ACTS_ROOT}/multimedia:multimedia",
D
dujingcheng@huawei.com 已提交
22
  "${ACTS_ROOT}/bundlemanager:appexecfwk",
S
shuxiong 已提交
23
  "${ACTS_ROOT}/account:account",
Q
q00313334 已提交
24
  "${ACTS_ROOT}/communication:communication",
J
jiyong 已提交
25
  "${ACTS_ROOT}/notification:notification",
C
chengxingzhen 已提交
26
  "${ACTS_ROOT}/ability:ability",
27 28 29 30
  "${ACTS_ROOT}/time:time",
  "${ACTS_ROOT}/theme:theme",
  "${ACTS_ROOT}/request:request",
  "${ACTS_ROOT}/inputmethod:inputmethod",
S
shuxiong 已提交
31
  "${ACTS_ROOT}/powermgr:powermgr",
S
shuxiong 已提交
32
  "${ACTS_ROOT}/startup:startup",
L
logic42 已提交
33
  "${ACTS_ROOT}/sensors:sensor",
34
  "${ACTS_ROOT}/distributeddatamgr:pasteboard",
M
mamingshuai 已提交
35 36
  "${ACTS_ROOT}/distributeddatamgr:distributeddatamgr",
  "${ACTS_ROOT}/graphic:graphic",
L
luffy505 已提交
37
  "${ACTS_ROOT}/arkui:arkui",
S
shuxiong 已提交
38
  "${ACTS_ROOT}/storage:storage",
39
  "${ACTS_ROOT}/commonlibrary:commonlibrary",
J
jiyong 已提交
40
  "${ACTS_ROOT}/usb:usb",
L
liuwei 已提交
41
  "${ACTS_ROOT}/multimodalinput:multimodalinput",
42
  "${ACTS_ROOT}/resourceschedule:resourceschedule",
高曦 已提交
43
  "${ACTS_ROOT}/telephony:telephony",
C
chenxuihui 已提交
44
  "${ACTS_ROOT}/hiviewdfx:hiviewdfxtestacts",
Q
q00313334 已提交
45
  "${ACTS_ROOT}/location:location",
J
jiyong_sd 已提交
46
  "${ACTS_ROOT}/settingsdata:settingsdata",
J
jiyong_sd 已提交
47
  "${ACTS_ROOT}/barrierfree:barrierfree",
A
anning 已提交
48
  "${ACTS_ROOT}/applications:applications",
M
mamingshuai 已提交
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
]

_all_test_packages_ivi = [
  # add acts for ivi here
  # "${ACTS_ROOT}/multimedia:multimedia_ivi",
]

_all_test_packages_intellitv = [
  # add acts for intellitv here
  "${ACTS_ROOT}/multimedia:multimedia_intellitv",
]

_all_test_packages_wearable = [
  # add acts for wearable here
  "${ACTS_ROOT}/multimedia:multimedia_wearable",
]

selected_packages_wearable = []
selected_packages_intellitv = []
selected_packages_ivi = []
selected_packages = []
assert(XTS_SUITENAME != "")
if (build_xts == true && XTS_SUITENAME == "acts") {
  _select_script = "//test/xts/tools/build/test_package_select.py"
  _subsystem_config_path = rebase_path(
          "$root_build_dir/build_configs/subsystem_info/src_subsystem_info.json")
  _select_args = [ _subsystem_config_path ] + _all_test_packages
  _select_args_ivi = [ _subsystem_config_path ] + _all_test_packages_ivi
  _select_args_intellitv =
      [ _subsystem_config_path ] + _all_test_packages_intellitv
  _select_args_wearable =
      [ _subsystem_config_path ] + _all_test_packages_wearable
  _target_subsystem = getenv("target_subsystem")

  if (_target_subsystem != "" && _target_subsystem != "all") {
    print("Build acts, target_subsystem=" + _target_subsystem)
    _select_args += [ "selected_subsystem=" + _target_subsystem ]
    _select_args_ivi += [ "selected_subsystem=" + _target_subsystem ]
    _select_args_intellitv += [ "selected_subsystem=" + _target_subsystem ]
    _select_args_wearable += [ "selected_subsystem=" + _target_subsystem ]
  }

  selected_packages = exec_script(_select_script, _select_args, "list lines")

  selected_packages_ivi =
      exec_script(_select_script, _select_args_ivi, "list lines")

  selected_packages_intellitv =
      exec_script(_select_script, _select_args_intellitv, "list lines")

  selected_packages_wearable =
      exec_script(_select_script, _select_args_wearable, "list lines")

  print("Selected packages:")
  print(selected_packages)

  # always include testtools
  selected_packages += [ "testtools:deploy_testtools" ]
  selected_packages_ivi += [ "testtools:deploy_testtools" ]
  selected_packages_intellitv += [ "testtools:deploy_testtools" ]
  selected_packages_wearable += [ "testtools:deploy_testtools" ]
} else {
  print("ACTS build is not enabled")
}