# Copyright (c) 2021-2024 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") if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") import("//build/lite/config/test.gni") if (ohos_build_type == "debug") { unittest("test_dumpcatcher_performance") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/faultloggerd" sources = [ "src/faultloggerd_performance_test.cpp" ] include_dirs = [ "include/", "$c_utils_include_path", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/procinfo/include", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", "$faultloggerd_interfaces_path/innerkits/dump_catcher/include/", "$faultloggerd_path/test/utils", "$faultloggerd_path/tools/process_dump", "$hilog_lite_include_path", ] deps = [ "$faultloggerd_path/interfaces/innerkits/dump_catcher:libdfx_dumpcatcher", "$faultloggerd_path/test/utils:dfx_test_util", ] external_deps = [ "hilog_lite:hilog_shared" ] } } group("performance") { deps = [ ":test_dumpcatcher_performance" ] } } else { import("//build/config/features.gni") import("//build/test.gni") config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "include/", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/dump_catcher/include/", "$faultloggerd_path/test/utils", ] } module_output_path = "faultloggerd/faultloggerd_native" ohos_performancetest("test_dumpcatcher_performance") { module_out_path = module_output_path sources = [ "src/faultloggerd_performance_test.cpp" ] configs = [ ":module_private_config" ] deps = [ "$faultloggerd_path/interfaces/innerkits/dump_catcher:libdfx_dumpcatcher", "$faultloggerd_path/test/utils:dfx_test_util", ] external_deps = [ "c_utils:utils", "googletest:gtest_main", ] } group("performance") { testonly = true deps = [ ":test_dumpcatcher_performance" ] } }