• 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/communication_lite/dsoftbus_hal:ActsDsoftbusMgrTest",
36        "//test/xts/acts/aafwk_lite/ability_hal:ActsAbilityMgrTest",
37        "//test/xts/acts/appexecfwk_lite/appexecfwk_hal:ActsBundleMgrTest",
38        "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest",
39        "//test/xts/acts/communication_lite/wifiservice_hal:ActsWifiServiceTest",
40        "//test/xts/acts/utils_lite/file_hal:ActsUtilsFileTest",
41        "//test/xts/acts/startup_lite/syspara_hal:ActsParameterTest",
42        "//test/xts/acts/iot_hardware_lite/iot_controller_hal:ActsWifiIotTest",
43        "//test/xts/acts/utils_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      ]
51    } else if (ohos_kernel_type == "liteos_a") {
52      all_features += [
53        "//test/xts/acts/kernel_lite:ActsKernelTest",
54        "//test/xts/acts/security_lite:securitytest",
55        "//test/xts/acts/utils_lite/kv_store_posix:ActsKvStoreTest",
56        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
57        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
58        "//test/xts/acts/open_posix_testsuite/conformance/interfaces:ActsOpenPosixTest",
59
60        "//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
61        "//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
62        "//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
63        "//test/xts/acts/multimedia_lite/media_lite_posix/audio_native:ActsMediaAudioTest",
64
65        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
66
67        #"//test/xts/acts/distributedschedule_lite/distributed_schedule_posix:ActsDMSTest",
68        "//test/xts/acts/hiviewdfx_lite/hilog_posix:ActsHilogTest",
69
70        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
71        "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest",
72        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",
73
74        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
75        "//test/xts/acts/global_lite:ActsGlobalTest",
76        "//test/xts/acts/sensors_lite:sensorstest",
77        "//test/xts/acts/update_lite/dupdate_posix:ActsUpdateTest",
78      ]
79    } else if (ohos_kernel_type == "linux") {
80      all_features += [
81        "//test/xts/acts/utils_lite/kv_store_posix:ActsKvStoreTest",
82        "//test/xts/acts/startup_lite/syspara_posix:ActsParameterTest",
83        "//test/xts/acts/startup_lite/bootstrap_posix:ActsBootstrapTest",
84        "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest",
85        "//test/xts/acts/security_lite:securitytest",
86
87        #"//test/xts/acts/multimedia_lite/camera_lite_posix/camera_native:ActsMediaCameraTest",
88        #"//test/xts/acts/multimedia_lite/media_lite_posix/player_native:ActsMediaPlayerTest",
89        #"//test/xts/acts/multimedia_lite/media_lite_posix/recorder_native:ActsMediaRecorderTest",
90        "//test/xts/acts/distributed_schedule_lite/system_ability_manager_posix:ActsSamgrTest",
91        "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest",
92        "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest",
93        "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest",
94      ]
95    }
96  }
97
98  if (ohos_build_type == "debug" && ohos_test_args != "notest") {
99    _all_features = ""
100    _product_json = rebase_path("${product_path}/config.json")
101    foreach(one_feature, all_features) {
102      _all_features = _all_features + one_feature + ","
103    }
104    _args = [
105      "--method_name",
106      "filter_by_subsystem",
107      "--arguments",
108      "testsuites=${_all_features}#product_json=${_product_json}",
109    ]
110    features += exec_script(rebase_path("//test/xts/tools/lite/build/utils.py"),
111                            _args,
112                            "list lines")
113  }
114}
115
116test_suite("acts") {
117  deps = [ ":acts_component" ]
118  version = "OpenHarmony-ACTS-1.0.1"
119  if (ohos_kernel_type == "liteos_a") {
120    deps += [ "//test/xts/tools/lite/others/query:query" ]
121    copy("query_copy") {
122      sources = [ "$root_out_dir/bin/query.bin" ]
123      outputs = [ "$root_out_dir/suites/acts/resource/tools/query.bin" ]
124    }
125  }
126}
127
128generate_notice_file("acts_notice_file") {
129  module_name = "acts"
130  module_source_dir_list = [
131    "//third_party/googletest",
132    "//third_party/unity",
133    "//third_party/bounds_checking_function",
134  ]
135}
136