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