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 "res_sched_exe_client_test.cpp", 39 "res_sched_exe_mgr_test.cpp", 40 "res_sched_exe_service_test.cpp", 41 ] 42 43 deps = [ 44 "${resschedexe_interfaces}/innerkits/ressched_executor_client:res_sched_exe_service_stub", 45 "${resschedexe_services}:resschedexesvc_static", 46 "../../../ressched/common:ressched_common_utils", 47 ] 48 49 external_deps = [ 50 "access_token:libaccesstoken_sdk", 51 "access_token:libnativetoken", 52 "access_token:libtoken_setproc", 53 "cJSON:cjson", 54 "c_utils:utils", 55 "ffrt:libffrt", 56 "hilog:libhilog", 57 "ipc:ipc_single", 58 "selinux_adapter:librestorecon", 59 ] 60 61 public_external_deps = [ "json:nlohmann_json_static" ] 62 63 cflags = [ 64 "-Dprivate=public", 65 "-Dprotected=public", 66 ] 67 68 sanitize = { 69 cfi = true 70 cfi_cross_dso = true 71 debug = false 72 } 73 74 branch_protector_ret = "pac_ret" 75} 76