1# Copyright (c) 2023 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
17MODULE_OUTPUT_PATH = "updater/updater_test"
18updater_path = rebase_path("${updater_absolutely_path}", ".")
19ohos_unittest("ring_buffer_test") {
20  testonly = true
21  module_out_path = MODULE_OUTPUT_PATH
22  sources = [ "ring_buffer_unittest.cpp" ]
23  include_dirs = [
24    "${updater_path}/services/common/ring_buffer",
25    "${updater_path}/services/include/log",
26    "${updater_path}/utils/include",
27    "${updater_path}/test/unittest",
28  ]
29  deps = [
30    "${updater_path}/services/common/ring_buffer:libringbuffer",
31    "${updater_path}/services/log:libupdaterlog",
32  ]
33  external_deps = [
34    "googletest:gmock_main",
35    "googletest:gtest_main",
36  ]
37  defines = [ "UPDATER_UT" ]
38  configs = [ "${updater_path}/test/unittest:utest_config" ]
39  install_enable = true
40  part_name = "updater"
41}
42