1# Copyright (c) 2021 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") 15 16module_output_path = "aafwk_standard/tools_test" 17 18config("module_private_config") { 19 visibility = [ ":*" ] 20 include_dirs = [] 21 cflags = [] 22 if (target_cpu == "arm") { 23 cflags += [ "-DBINDER_IPC_32BIT" ] 24 } 25 defines = [ 26 "APP_LOG_TAG = \"ZipUnitTest\"", 27 "LOG_DOMAIN = 0xD002201", 28 ] 29} 30 31ohos_unittest("zip_test") { 32 module_out_path = module_output_path 33 34 include_dirs = [ "//foundation/aafwk/standard/tools/zip/include" ] 35 sources = [ 36 "//foundation/aafwk/standard/tools/zip/src/file_path.cpp", 37 "//foundation/aafwk/standard/tools/zip/src/zip.cpp", 38 "//foundation/aafwk/standard/tools/zip/src/zip_internal.cpp", 39 "//foundation/aafwk/standard/tools/zip/src/zip_reader.cpp", 40 "//foundation/aafwk/standard/tools/zip/src/zip_utils.cpp", 41 "//foundation/aafwk/standard/tools/zip/src/zip_writer.cpp", 42 "//foundation/aafwk/standard/tools/zip/test/unittest/zip_test.cpp", 43 ] 44 45 configs = [ 46 "//foundation/aafwk/standard/tools/zip:zip_config", 47 ":module_private_config", 48 ] 49 50 deps = [ 51 "//foundation/aafwk/standard/interfaces/innerkits/want:want", 52 "//foundation/ace/napi:ace_napi", 53 "//foundation/appexecfwk/standard/interfaces/innerkits/task_dispatcher:appkit_dispatcher_td", 54 "//third_party/googletest:gmock_main", 55 "//third_party/googletest:gtest_main", 56 "//third_party/libuv:uv_static", 57 "//third_party/zlib:libz", 58 "//utils/native/base:utils", 59 "//utils/native/base:utils", 60 ] 61 62 external_deps = [ 63 "hiviewdfx_hilog_native:libhilog", 64 "ipc:ipc_core", 65 ] 66} 67 68group("unittest") { 69 testonly = true 70 deps = [] 71 72 deps += [ ":zip_test" ] 73} 74