15ccb8f90Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
25ccb8f90Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
35ccb8f90Sopenharmony_ci# you may not use this file except in compliance with the License.
45ccb8f90Sopenharmony_ci# You may obtain a copy of the License at
55ccb8f90Sopenharmony_ci#
65ccb8f90Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
75ccb8f90Sopenharmony_ci#
85ccb8f90Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
95ccb8f90Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
105ccb8f90Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115ccb8f90Sopenharmony_ci# See the License for the specific language governing permissions and
125ccb8f90Sopenharmony_ci# limitations under the License.
135ccb8f90Sopenharmony_ci
145ccb8f90Sopenharmony_ciimport("//build/test.gni")
155ccb8f90Sopenharmony_ciimport("../../../powermgr.gni")
165ccb8f90Sopenharmony_ci
175ccb8f90Sopenharmony_cimodule_output_path = "power_manager/power_manager"
185ccb8f90Sopenharmony_ci
195ccb8f90Sopenharmony_ci##############################fuzztest##########################################
205ccb8f90Sopenharmony_ciohos_fuzztest("LockScreenAfterTimingOutFuzzTest") {
215ccb8f90Sopenharmony_ci  module_out_path = module_output_path
225ccb8f90Sopenharmony_ci  fuzz_config_file =
235ccb8f90Sopenharmony_ci      "${powermgr_root_path}/test/fuzztest/lockscreenaftertimingout_fuzzer"
245ccb8f90Sopenharmony_ci
255ccb8f90Sopenharmony_ci  include_dirs = [
265ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/hibernate",
275ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/runninglock",
285ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/shutdown",
295ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/suspend",
305ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/wakeup",
315ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/screenoffpre",
325ccb8f90Sopenharmony_ci    "../power_utils",
335ccb8f90Sopenharmony_ci  ]
345ccb8f90Sopenharmony_ci
355ccb8f90Sopenharmony_ci  if (power_manager_feature_wakeup_action) {
365ccb8f90Sopenharmony_ci    include_dirs += [ "${powermgr_service_path}/native/src/wakeup_action" ]
375ccb8f90Sopenharmony_ci  }
385ccb8f90Sopenharmony_ci
395ccb8f90Sopenharmony_ci  configs = [
405ccb8f90Sopenharmony_ci    "${powermgr_utils_path}:coverage_flags",
415ccb8f90Sopenharmony_ci    "${powermgr_utils_path}:utils_config",
425ccb8f90Sopenharmony_ci  ]
435ccb8f90Sopenharmony_ci
445ccb8f90Sopenharmony_ci  cflags = [
455ccb8f90Sopenharmony_ci    "-g",
465ccb8f90Sopenharmony_ci    "-O0",
475ccb8f90Sopenharmony_ci    "-Wno-unused-variable",
485ccb8f90Sopenharmony_ci    "-fno-omit-frame-pointer",
495ccb8f90Sopenharmony_ci  ]
505ccb8f90Sopenharmony_ci  sources = [
515ccb8f90Sopenharmony_ci    "../power_utils/power_fuzzer.cpp",
525ccb8f90Sopenharmony_ci    "./lockscreenaftertimingout_fuzzer_test.cpp",
535ccb8f90Sopenharmony_ci  ]
545ccb8f90Sopenharmony_ci  deps = [
555ccb8f90Sopenharmony_ci    "${powermgr_service_path}:powermgr_stub",
565ccb8f90Sopenharmony_ci    "${powermgr_service_path}:powermgrservice",
575ccb8f90Sopenharmony_ci    "${powermgr_service_path}/native/src/actions:powermgr_actions",
585ccb8f90Sopenharmony_ci  ]
595ccb8f90Sopenharmony_ci
605ccb8f90Sopenharmony_ci  external_deps = [
615ccb8f90Sopenharmony_ci    "ability_runtime:ability_manager",
625ccb8f90Sopenharmony_ci    "c_utils:utils",
635ccb8f90Sopenharmony_ci    "ffrt:libffrt",
645ccb8f90Sopenharmony_ci    "hilog:libhilog",
655ccb8f90Sopenharmony_ci    "input:libmmi-client",
665ccb8f90Sopenharmony_ci    "ipc:ipc_core",
675ccb8f90Sopenharmony_ci    "jsoncpp:jsoncpp",
685ccb8f90Sopenharmony_ci    "power_manager:power_ffrt",
695ccb8f90Sopenharmony_ci  ]
705ccb8f90Sopenharmony_ci  if (has_sensors_sensor_part) {
715ccb8f90Sopenharmony_ci    external_deps += [ "sensor:sensor_interface_native" ]
725ccb8f90Sopenharmony_ci  }
735ccb8f90Sopenharmony_ci  if (has_hiviewdfx_hisysevent_part) {
745ccb8f90Sopenharmony_ci    external_deps += [ "hisysevent:libhisysevent" ]
755ccb8f90Sopenharmony_ci  }
765ccb8f90Sopenharmony_ci}
77