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