1# Copyright (c) 2022 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/config/features.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17 18#####################hydra-fuzz################### 19import("../../../screenlock.gni") 20 21##############################fuzztest########################################## 22ohos_fuzztest("ScreenlockManagerFuzzTest") { 23 module_out_path = "screenlock_mgr/screenlock_mgr" 24 25 fuzz_config_file = 26 "${screenlock_mgr_path}/test/fuzztest/screenlockmanager_fuzzer" 27 28 include_dirs = [ 29 "${screenlock_mgr_path}/frameworks/js/napi/include", 30 "${screenlock_mgr_path}/services/include", 31 ] 32 33 cflags = [ 34 "-g", 35 "-O0", 36 "-Wno-unused-variable", 37 "-fno-omit-frame-pointer", 38 ] 39 40 if (screenlock_mgr_so_crop == true) { 41 cflags += [ "-DIS_SO_CROP_H" ] 42 } 43 44 deps = [ 45 "${screenlock_mgr_path}/frameworks/js/napi:screenlock_static", 46 "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", 47 "${screenlock_mgr_path}/services:screenlock_server_static", 48 ] 49 50 external_deps = [ 51 "c_utils:utils", 52 "eventhandler:libeventhandler", 53 "ffrt:libffrt", 54 "hilog:libhilog", 55 "ipc:ipc_single", 56 "napi:ace_napi", 57 "os_account:os_account_innerkits", 58 "preferences:native_preferences", 59 "safwk:system_ability_fwk", 60 "user_auth_framework:userauth_client", 61 "window_manager:libdm", 62 ] 63 64 sources = [ 65 "innerListener_fuzz_utils.cpp", 66 "screenlockmanager_fuzzer.cpp", 67 ] 68} 69 70############################################################################### 71group("fuzztest") { 72 testonly = true 73 deps = [] 74 deps += [ 75 # deps file 76 ":ScreenlockManagerFuzzTest", 77 ] 78} 79############################################################################### 80