1# Copyright (c) 2024 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/test.gni") 15import("../../../ressched/ressched.gni") 16import("../../ressched_executor.gni") 17 18group("unittest") { 19 testonly = true 20 deps = [ ":resschedexefwk_test" ] 21} 22 23module_output_path = 24 "resource_schedule_service/resource_schedule_service/ressched_executor" 25 26ohos_unittest("resschedexefwk_test") { 27 module_out_path = module_output_path 28 29 include_dirs = [ 30 "${ressched_common}/include", 31 "${resschedexe_common}/include", 32 "${resschedexe_interfaces}/innerkits/ressched_executor_client/include", 33 "mock/include", 34 ] 35 36 sources = [ 37 "mock/src/mock_ipc_skeleton.cpp", 38 "executor_hitrace_chain_test.cpp", 39 "res_sched_exe_client_test.cpp", 40 "res_sched_exe_mgr_test.cpp", 41 "res_sched_exe_service_test.cpp", 42 ] 43 44 deps = [ 45 "${resschedexe_interfaces}/innerkits/ressched_executor_client:res_sched_exe_service_stub", 46 "${resschedexe_services}:resschedexesvc_static", 47 "../../../ressched/common:ressched_common_utils", 48 ] 49 50 external_deps = [ 51 "access_token:libaccesstoken_sdk", 52 "access_token:libnativetoken", 53 "access_token:libtoken_setproc", 54 "cJSON:cjson", 55 "c_utils:utils", 56 "ffrt:libffrt", 57 "hilog:libhilog", 58 "hitrace:libhitracechain", 59 "ipc:ipc_single", 60 "selinux_adapter:librestorecon", 61 ] 62 63 public_external_deps = [ "json:nlohmann_json_static" ] 64 65 cflags = [ 66 "-Dprivate=public", 67 "-Dprotected=public", 68 ] 69 70 sanitize = { 71 cfi = true 72 cfi_cross_dso = true 73 debug = false 74 } 75 76 branch_protector_ret = "pac_ret" 77} 78