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("../../../../core/common/dfx/dsoftbus_dfx.gni") 15import("../../../../dsoftbus.gni") 16 17dsoftbus_root_path = "../../../.." 18 19if (defined(ohos_lite)) { 20 import("//build/lite/config/component/lite_component.gni") 21 import("//build/lite/config/test.gni") 22 23 if (ohos_build_type == "debug") { 24 unittest("CommonCoreBitMapTest") { 25 output_extension = "bin" 26 output_dir = "$root_out_dir/test/unittest/dsoftbus" 27 sources = [ "bitmap_test.cpp" ] 28 include_dirs = [ 29 "$dsoftbus_root_path/core/common/include", 30 "$dsoftbus_root_path/interfaces/kits/common", 31 ] 32 deps = [ "$dsoftbus_root_path/core/common:softbus_utils" ] 33 deps += [ "$hilog_lite_deps_path" ] 34 } 35 } 36} else { 37 import("//build/test.gni") 38 39 module_output_path = "dsoftbus/common" 40 ohos_unittest("CommonCoreBitMapTest") { 41 module_out_path = module_output_path 42 sources = [ "bitmap_test.cpp" ] 43 include_dirs = [ 44 "$dsoftbus_root_path/core/common/include", 45 "$dsoftbus_root_path/interfaces/kits/common", 46 ] 47 deps = [ "$dsoftbus_root_path/core/common:softbus_utils" ] 48 if (is_standard_system) { 49 external_deps = [ "hilog:libhilog" ] 50 } else { 51 external_deps = [ "hilog:libhilog" ] 52 } 53 } 54 group("unittest") { 55 testonly = true 56 deps = [ ":CommonCoreBitMapTest" ] 57 } 58} 59