• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-2021 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("//build/lite/config/subsystem/aafwk/config.gni")
15import("//build/lite/config/test.gni")
16import("//test/xts/tools/lite/build/suite_lite.gni")
17
18lite_component("acts_component") {
19  all_features = []
20  features = []
21  if (ohos_xts_test_args != "") {
22    args = [
23      "--method_name",
24      "get_target_modules",
25      "--arguments",
26      "all_features=${ohos_xts_test_args}",
27    ]
28    all_features +=
29        exec_script(rebase_path("//test/xts/tools/lite/build/utils.py"),
30                    args,
31                    "list lines")
32  } else {
33    if (ohos_kernel_type == "liteos_m") {
34      all_features += [
35        "//test/xts/acts/ability_lite/ability_hal:ActsAbilityMgrTest",
36        "//test/xts/acts/appexecfwk_lite/appexecfwk_hal:ActsBundleMgrTest",
37        "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest",
38
39        #"//test/xts/acts/communication_lite/wifiservice_hal:ActsWifiServiceTest",
40        "//test/xts/acts/commonlibrary_lite/file_hal:ActsUtilsFileTest",
41        "//test/xts/acts/startup_lite/syspara_hal:ActsParameterTest",
42        "//test/xts/acts/iothardware_lite/peripheral_hal:ActsWifiIotTest",
43        "//test/xts/acts/distributeddatamgr_lite/kv_store_hal:ActsKvStoreTest",
44        "//test/xts/acts/security_lite/huks/liteos_m_adapter:ActsHuksHalFunctionTest",
45        "//test/xts/acts/hiviewdfx_lite/hilog_hal:ActsDfxFuncTest",
46        "//test/xts/acts/hiviewdfx_lite/hievent_hal:ActsHieventLiteTest",
47        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_hal:ActsSamgrTest",
48        "//test/xts/acts/update_lite/dupdate_hal:ActsUpdaterFuncTest",
49        "//test/xts/acts/startup_lite/bootstrap_hal:ActsBootstrapTest",
50        "//test/xts/acts/xts_lite/device_attest_lite/device_attestStart_hal:ActsDeviceAttestTest",
51      ]
52    } else if (ohos_kernel_type == "uniproton") {
53      all_features += [
54        "//test/xts/acts/commonlibrary_lite/file_hal:ActsUtilsFileTest",
55        "//test/xts/acts/startup_lite/bootstrap_hal:ActsBootstrapTest",
56      ]
57      features += [ "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest" ]
58    } else if (ohos_kernel_type == "liteos_a") {
59      all_features += [
60        "//test/xts/acts/kernel_lite:ActsKernelTest",
61        "//test/xts/acts/security_lite:securitytest",
62        "//test/xts/acts/distributeddatamgr_lite/kv_store_posix:ActsKvStoreTest",
63        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
64        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
65        "//test/xts/acts/open_posix_testsuite/conformance/interfaces:ActsOpenPosixTest",
66
67        "//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
68        "//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
69        "//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
70        "//test/xts/acts/multimedia_lite/media_lite_posix/audio_native:ActsMediaAudioTest",
71
72        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
73
74        #"//test/xts/acts/systemabilitymgr_lite/distributed_schedule_posix:ActsDMSTest",
75        "//test/xts/acts/hiviewdfx_lite/hilog_posix:ActsHilogTest",
76
77        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
78        "//test/xts/acts/ability_lite/ability_posix:ActsAbilityMgrTest",
79        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",
80
81        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
82        "//test/xts/acts/global_lite:ActsGlobalTest",
83        "//test/xts/acts/sensors_lite:sensorstest",
84        "//test/xts/acts/update_lite/dupdate_posix:ActsUpdateTest",
85        "//test/xts/acts/xts_lite/device_attest_lite/device_attestStart_posix:ActsDeviceAttestStartTest",
86        "//test/xts/acts/xts_lite/device_attest_lite/device_attestQuerry_posix:ActsDeviceAttestQuerryTest",
87      ]
88    } else if (ohos_kernel_type == "linux") {
89      all_features += [
90        "//test/xts/acts/distributeddatamgr_lite/kv_store_posix:ActsKvStoreTest",
91        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
92        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
93        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",
94        "//test/xts/acts/security_lite:securitytest",
95
96        #"//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
97        #"//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
98        #"//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
99        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
100        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
101        "//test/xts/acts/ability_lite/ability_posix:ActsAbilityMgrTest",
102        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
103        "//test/xts/acts/xts_lite/device_attest_lite/device_attestStart_posix:ActsDeviceAttestStartTest",
104        "//test/xts/acts/xts_lite/device_attest_lite/device_attestQuerry_posix:ActsDeviceAttestQuerryTest",
105      ]
106    }
107  }
108
109  if (ohos_build_type == "debug" && ohos_test_args != "notest") {
110    _all_features = ""
111    _product_json = rebase_path("${product_config_path}/config.json")
112    foreach(one_feature, all_features) {
113      _all_features = _all_features + one_feature + ","
114    }
115    _args = [
116      "--method_name",
117      "filter_by_subsystem",
118      "--arguments",
119      "testsuites=${_all_features}#product_json=${_product_json}",
120    ]
121    features += exec_script(rebase_path("//test/xts/tools/lite/build/utils.py"),
122                            _args,
123                            "list lines")
124  }
125}
126
127test_suite("acts") {
128  deps = [ ":acts_component" ]
129  version = "OpenHarmony-ACTS-1.0.1"
130  if (ohos_kernel_type == "liteos_a") {
131    deps += [ "//test/xts/tools/lite/others/query:query" ]
132    copy("query_copy") {
133      sources = [ "$root_out_dir/bin/query.bin" ]
134      outputs = [ "$root_out_dir/suites/acts/resource/tools/query.bin" ]
135    }
136  }
137}
138
139generate_notice_file("acts_notice_file") {
140  module_name = "acts"
141  module_source_dir_list = [
142    "//third_party/googletest",
143    "//third_party/unity",
144    "//third_party/bounds_checking_function",
145  ]
146}
147