179a732c7Sopenharmony_ci# Copyright (c) 2022-2024 Huawei Device Co., Ltd.
279a732c7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
379a732c7Sopenharmony_ci# you may not use this file except in compliance with the License.
479a732c7Sopenharmony_ci# You may obtain a copy of the License at
579a732c7Sopenharmony_ci#
679a732c7Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
779a732c7Sopenharmony_ci#
879a732c7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
979a732c7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1079a732c7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1179a732c7Sopenharmony_ci# See the License for the specific language governing permissions and
1279a732c7Sopenharmony_ci# limitations under the License.
1379a732c7Sopenharmony_ci
1479a732c7Sopenharmony_ciimport("//build/test.gni")
1579a732c7Sopenharmony_ciimport("//foundation/distributedhardware/device_manager/device_manager.gni")
1679a732c7Sopenharmony_ci
1779a732c7Sopenharmony_cimodule_output_path = "device_manager/devicemanager"
1879a732c7Sopenharmony_ci
1979a732c7Sopenharmony_ciohos_benchmarktest("DeviceManagerTest") {
2079a732c7Sopenharmony_ci  module_out_path = module_output_path
2179a732c7Sopenharmony_ci  sources = [ "device_manager_test.cpp" ]
2279a732c7Sopenharmony_ci
2379a732c7Sopenharmony_ci  include_dirs = [ "${common_path}/include" ]
2479a732c7Sopenharmony_ci
2579a732c7Sopenharmony_ci  cflags = []
2679a732c7Sopenharmony_ci  if (target_cpu == "arm") {
2779a732c7Sopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
2879a732c7Sopenharmony_ci  }
2979a732c7Sopenharmony_ci
3079a732c7Sopenharmony_ci  deps = [ "${innerkits_path}/native_cpp:devicemanagersdk" ]
3179a732c7Sopenharmony_ci
3279a732c7Sopenharmony_ci  external_deps = [
3379a732c7Sopenharmony_ci    "access_token:libaccesstoken_sdk",
3479a732c7Sopenharmony_ci    "access_token:libnativetoken",
3579a732c7Sopenharmony_ci    "access_token:libtoken_setproc",
3679a732c7Sopenharmony_ci    "benchmark:benchmark",
3779a732c7Sopenharmony_ci    "bounds_checking_function:libsec_shared",
3879a732c7Sopenharmony_ci    "dsoftbus:softbus_client",
3979a732c7Sopenharmony_ci  ]
4079a732c7Sopenharmony_ci}
4179a732c7Sopenharmony_ci
4279a732c7Sopenharmony_cigroup("benchmarktest") {
4379a732c7Sopenharmony_ci  testonly = true
4479a732c7Sopenharmony_ci  deps = []
4579a732c7Sopenharmony_ci
4679a732c7Sopenharmony_ci  deps += [
4779a732c7Sopenharmony_ci    # deps file
4879a732c7Sopenharmony_ci    ":DeviceManagerTest",
4979a732c7Sopenharmony_ci  ]
5079a732c7Sopenharmony_ci}
51