# Copyright (C) 2021 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("//build/test.gni") import("../../../../../build/config.gni") module_output_path = "${OHOS_PROFILER_TEST_MODULE_OUTPUT_PATH}/sp_daemon" config("module_private_config") { visibility = [ ":*" ] } ohos_unittest("sp_daemon_ut") { module_out_path = module_output_path sources = [ "../ByTrace.cpp", "../CPU.cpp", "../Capture.cpp", "../DDR.cpp", "../Dubai.cpp", "../FPS.cpp", "../GPU.cpp", "../GpuCounter.cpp", "../GpuCounterCallback.cpp", "../Network.cpp", "../Power.cpp", "../RAM.cpp", "../Temperature.cpp", "../parse_click_complete_trace.cpp", "../parse_click_response_trace.cpp", "../parse_radar.cpp", "../parse_slide_fps_trace.cpp", "../profiler_fps.cpp", "../sdk_data_recv.cpp", "../sp_log.cpp", "../sp_task.cpp", "../sp_utils.cpp", "../startup_delay.cpp", "unittest/bytrace_test.cpp", "unittest/ddr_test.cpp", "unittest/dubai_test.cpp", "unittest/fps_test.cpp", "unittest/parse_radar_test.cpp", "unittest/smartperf_main_test.cpp", "unittest/sp_daemon_test.cpp", "unittest/sp_task_test.cpp", "unittest/sp_utils_test.cpp", ] include_dirs = [ "${OHOS_PROFILER_DIR}/host/smartperf/client/client_command/include", "//third_party/googletest/googletest/include/gtest", ] deps = [ "${OHOS_PROFILER_DIR}/host/smartperf/client/client_command:SP_daemon", "//third_party/googletest:gtest", "//third_party/libpng:libpng", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hiview:libucollection_utility", "image_framework:image_native", "init:libbegetutil", "window_manager:libdm", "window_manager:libwm", ] configs = [ "//build/config/compiler:exceptions" ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" part_name = "${OHOS_PROFILER_PART_NAME}" } group("unittest") { testonly = true deps = [ ":sp_daemon_ut" ] }