137a09cd7Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
237a09cd7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
337a09cd7Sopenharmony_ci# you may not use this file except in compliance with the License.
437a09cd7Sopenharmony_ci# You may obtain a copy of the License at
537a09cd7Sopenharmony_ci#
637a09cd7Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
737a09cd7Sopenharmony_ci#
837a09cd7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
937a09cd7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1037a09cd7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1137a09cd7Sopenharmony_ci# See the License for the specific language governing permissions and
1237a09cd7Sopenharmony_ci# limitations under the License.
1337a09cd7Sopenharmony_ci
1437a09cd7Sopenharmony_ciimport("//build/config/features.gni")
1537a09cd7Sopenharmony_ciimport("//build/test.gni")
1637a09cd7Sopenharmony_ciimport("../../../thermalmgr.gni")
1737a09cd7Sopenharmony_ci
1837a09cd7Sopenharmony_cimodule_output_path = "thermal_manager/thermal_manager"
1937a09cd7Sopenharmony_ci
2037a09cd7Sopenharmony_ci##############################fuzztest##########################################
2137a09cd7Sopenharmony_ciohos_fuzztest("ThermalTempCallbackFuzzTest") {
2237a09cd7Sopenharmony_ci  module_out_path = module_output_path
2337a09cd7Sopenharmony_ci  fuzz_config_file =
2437a09cd7Sopenharmony_ci      "${thermal_manager_path}/test/fuzztest/thermaltempcallback_fuzzer"
2537a09cd7Sopenharmony_ci
2637a09cd7Sopenharmony_ci  include_dirs = [
2737a09cd7Sopenharmony_ci    "./",
2837a09cd7Sopenharmony_ci    "${thermal_inner_api}/native/include",
2937a09cd7Sopenharmony_ci    "${utils_path}/native/include",
3037a09cd7Sopenharmony_ci    "../thermal_utils",
3137a09cd7Sopenharmony_ci  ]
3237a09cd7Sopenharmony_ci
3337a09cd7Sopenharmony_ci  configs = [ "${utils_path}:coverage_flags" ]
3437a09cd7Sopenharmony_ci
3537a09cd7Sopenharmony_ci  cflags = [
3637a09cd7Sopenharmony_ci    "-g",
3737a09cd7Sopenharmony_ci    "-O0",
3837a09cd7Sopenharmony_ci    "-Wno-unused-variable",
3937a09cd7Sopenharmony_ci    "-fno-omit-frame-pointer",
4037a09cd7Sopenharmony_ci  ]
4137a09cd7Sopenharmony_ci  sources = [
4237a09cd7Sopenharmony_ci    "../thermal_utils/thermal_fuzzer_test.cpp",
4337a09cd7Sopenharmony_ci    "./thermaltempcallback_fuzzer_test.cpp",
4437a09cd7Sopenharmony_ci  ]
4537a09cd7Sopenharmony_ci  deps = [
4637a09cd7Sopenharmony_ci    "${thermal_manager_path}/services:thermalservice",
4737a09cd7Sopenharmony_ci    "${thermal_service_zidl}:thermalmgr_proxy",
4837a09cd7Sopenharmony_ci    "${thermal_service_zidl}:thermalmgr_stub",
4937a09cd7Sopenharmony_ci    "${utils_path}:thermal_utils",
5037a09cd7Sopenharmony_ci  ]
5137a09cd7Sopenharmony_ci
5237a09cd7Sopenharmony_ci  external_deps = [
5337a09cd7Sopenharmony_ci    "c_utils:utils",
5437a09cd7Sopenharmony_ci    "drivers_interface_thermal:libthermal_proxy_1.1",
5537a09cd7Sopenharmony_ci    "hdf_core:libhdi",
5637a09cd7Sopenharmony_ci    "hdf_core:libpub_utils",
5737a09cd7Sopenharmony_ci    "hilog:libhilog",
5837a09cd7Sopenharmony_ci    "ipc:ipc_core",
5937a09cd7Sopenharmony_ci    "libxml2:libxml2",
6037a09cd7Sopenharmony_ci    "safwk:system_ability_fwk",
6137a09cd7Sopenharmony_ci    "samgr:samgr_proxy",
6237a09cd7Sopenharmony_ci  ]
6337a09cd7Sopenharmony_ci
6437a09cd7Sopenharmony_ci  defines = []
6537a09cd7Sopenharmony_ci  if (has_thermal_airplane_manager_part) {
6637a09cd7Sopenharmony_ci    defines += [ "HAS_THERMAL_AIRPLANE_MANAGER_PART" ]
6737a09cd7Sopenharmony_ci    external_deps += [ "netmanager_base:net_conn_manager_if" ]
6837a09cd7Sopenharmony_ci  }
6937a09cd7Sopenharmony_ci}
70