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("//base/update/updater/updater_default_cfg.gni") 15import("//build/test.gni") 16 17updater_path = rebase_path("${updater_absolutely_path}", ".") 18 19MODULE_OUTPUT_PATH = "updater/updater_test" 20 21ohos_unittest("factory_reset_unittest") { 22 defines = [ "UPDATER_UT" ] 23 testonly = true 24 module_out_path = MODULE_OUTPUT_PATH 25 sources = [ 26 "${updater_path}/services/factory_reset/factory_reset.cpp", 27 "factory_reset_unittest.cpp", 28 ] 29 30 include_dirs = [ 31 "${updater_path}/utils/include", 32 "${updater_path}/services", 33 "${updater_path}/services/include", 34 "${updater_path}/services/include/package", 35 "${updater_path}/services/factory_reset/", 36 "${updater_path}/interfaces/kits/include/", 37 "${updater_path}/services/common", 38 ] 39 40 deps = [ 41 "${updater_path}/services/fs_manager:libfsmanager", 42 "${updater_path}/services/log:libupdaterlog", 43 "${updater_path}/utils:libutils", 44 ] 45 46 external_deps = [ "init:libbegetutil_static" ] 47 configs = [ "${updater_path}/test/unittest:utest_config" ] 48 install_enable = true 49 part_name = "updater" 50} 51