1# Copyright (C) 2021 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("../../../../../build/config.gni") 16 17module_output_path = "${OHOS_PROFILER_TEST_MODULE_OUTPUT_PATH}/sp_daemon" 18config("module_private_config") { 19 visibility = [ ":*" ] 20} 21 22ohos_unittest("sp_daemon_ut") { 23 module_out_path = module_output_path 24 sources = [ 25 "../ByTrace.cpp", 26 "../CPU.cpp", 27 "../Capture.cpp", 28 "../DDR.cpp", 29 "../Dubai.cpp", 30 "../FPS.cpp", 31 "../GPU.cpp", 32 "../GpuCounter.cpp", 33 "../GpuCounterCallback.cpp", 34 "../Network.cpp", 35 "../Power.cpp", 36 "../RAM.cpp", 37 "../Temperature.cpp", 38 "../lock_frequency.cpp", 39 "../parse_click_complete_trace.cpp", 40 "../parse_click_response_trace.cpp", 41 "../parse_radar.cpp", 42 "../parse_slide_fps_trace.cpp", 43 "../profiler_fps.cpp", 44 "../sdk_data_recv.cpp", 45 "../sp_log.cpp", 46 "../sp_task.cpp", 47 "../sp_utils.cpp", 48 "../startup_delay.cpp", 49 "unittest/bytrace_test.cpp", 50 "unittest/ddr_test.cpp", 51 "unittest/dubai_test.cpp", 52 "unittest/fps_test.cpp", 53 "unittest/parse_radar_test.cpp", 54 "unittest/smartperf_main_test.cpp", 55 "unittest/sp_daemon_test.cpp", 56 "unittest/sp_task_test.cpp", 57 "unittest/sp_utils_test.cpp", 58 ] 59 include_dirs = [ 60 "${OHOS_PROFILER_DIR}/host/smartperf/client/client_command/include", 61 "//third_party/googletest/googletest/include/gtest", 62 ] 63 deps = [ 64 "${OHOS_PROFILER_DIR}/host/smartperf/client/client_command:SP_daemon", 65 "//third_party/googletest:gtest", 66 "//third_party/libpng:libpng", 67 ] 68 external_deps = [ 69 "c_utils:utils", 70 "hilog:libhilog", 71 "hiview:libucollection_utility", 72 "image_framework:image_native", 73 "init:libbegetutil", 74 "window_manager:libdm", 75 "window_manager:libwm", 76 ] 77 78 configs = [ "//build/config/compiler:exceptions" ] 79 80 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 81 part_name = "${OHOS_PROFILER_PART_NAME}" 82} 83 84group("unittest") { 85 testonly = true 86 deps = [ ":sp_daemon_ut" ] 87} 88