• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/test.gni")
15import("../../../../appexecfwk.gni")
16
17module_output_path = "bundle_framework/tools"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21  include_dirs = []
22  cflags = []
23  if (target_cpu == "arm") {
24    cflags += [ "-DBINDER_IPC_32BIT" ]
25  }
26}
27
28ohos_unittest("zip_test") {
29  module_out_path = module_output_path
30
31  sources = [
32    "../kits/napi/zlib_callback_info.cpp",
33    "../src/file_path.cpp",
34    "../src/zip.cpp",
35    "../src/zip_internal.cpp",
36    "../src/zip_reader.cpp",
37    "../src/zip_utils.cpp",
38    "../src/zip_writer.cpp",
39    "unittest/zip_test.cpp",
40  ]
41
42  configs = [
43    "../:zip_config",
44    ":module_private_config",
45  ]
46
47  deps = [
48    "${common_path}:libappexecfwk_common",
49    "${kits_path}/js/common:bundle_napi_common",
50    "//third_party/googletest:gmock_main",
51    "//third_party/googletest:gtest_main",
52    "//third_party/zlib:libz",
53  ]
54
55  external_deps = [
56    "bundle_framework:appexecfwk_base",
57    "bundle_framework:appexecfwk_core",
58    "c_utils:utils",
59    "eventhandler:libeventhandler",
60    "hiviewdfx_hilog_native:libhilog",
61    "ipc:ipc_core",
62    "napi:ace_napi",
63  ]
64}
65
66group("unittest") {
67  testonly = true
68  deps = [ ":zip_test" ]
69}
70