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("//build/test.gni") 15import("../../../../../os_account.gni") 16 17module_output_path = "os_account/frameworks/os_account" 18 19config("os_account_frameworks_config_benchmarktest") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ "${innerkits_path}/include" ] 23 24 cflags = [] 25 if (os_account_enable_multiple_os_accounts) { 26 cflags += [ "-DENABLE_MULTIPLE_OS_ACCOUNTS" ] 27 } 28 29 if (target_cpu == "arm") { 30 cflags += [ "-DBINDER_IPC_32BIT" ] 31 } 32 33 defines = [ 34 "ACCOUNT_LOG_TAG = \"OsAccountBenchmarkTestFwk\"", 35 "LOG_DOMAIN = 0xD001B00", 36 ] 37} 38 39ohos_benchmarktest("os_account_manager_benchmark_test") { 40 module_out_path = module_output_path 41 42 sources = [ "os_account_manager_benchmark_test.cpp" ] 43 configs = [ ":os_account_frameworks_config_benchmarktest" ] 44 45 deps = [ 46 "${common_path}:libaccount_common", 47 "${os_account_innerkits_native_path}:os_account_innerkits", 48 "//third_party/benchmark", 49 "//third_party/googletest:gmock_main", 50 "//third_party/googletest:gtest_main", 51 ] 52 53 external_deps = [ "c_utils:utils" ] 54} 55 56group("benchmarktest") { 57 testonly = true 58 59 deps = [ ":os_account_manager_benchmark_test" ] 60} 61