# Copyright (c) 2022-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/hiviewdfx/faultloggerd/faultloggerd.gni") config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "include", "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/test/utils", ] } if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") import("//build/lite/config/test.gni") if (ohos_build_type == "debug") { unittest("FaultloggerdModuleTest") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/faultloggerd" configs = [ ":module_private_config" ] sources = [ "faultloggerd_module_test.cpp" ] deps = [ "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", "$faultloggerd_path/test/utils:dfx_test_util", ] external_deps = [ "hilog_lite:hilog_shared" ] } } group("moduletest") { deps = [ ":FaultloggerdModuleTest" ] } } else { import("//build/config/features.gni") import("//build/test.gni") module_output_path = "faultloggerd/faultloggerd_native" ohos_moduletest("FaultloggerdModuleTest") { module_out_path = module_output_path sources = [ "faultloggerd_module_test.cpp" ] configs = [ ":module_private_config", "$faultloggerd_path/common/build:coverage_flags", ] deps = [ "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", "$faultloggerd_path/test/utils:dfx_test_util", ] external_deps = [ "c_utils:utils", "googletest:gtest_main", ] } group("moduletest") { testonly = true deps = [ ":FaultloggerdModuleTest" ] } }