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