1# Copyright (c) 2024 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("../../test.gni") 15 16module_output_path = "previewer/util" 17 18group("util_unittest") { 19 testonly = true 20 deps = [ ":util_test" ] 21} 22 23ide_unittest("util_test") { 24 testonly = true 25 part_name = "previewer" 26 subsystem_name = "ide" 27 module_out_path = module_output_path 28 output_name = "util" 29 sources = [ 30 "$ide_previewer_path/test/mock/MockGlobalResult.cpp", 31 "$ide_previewer_path/test/mock/util/MockLocalSocket.cpp", 32 "$ide_previewer_path/util/CallbackQueue.cpp", 33 "$ide_previewer_path/util/CommandParser.cpp", 34 "$ide_previewer_path/util/CppTimer.cpp", 35 "$ide_previewer_path/util/CppTimerManager.cpp", 36 "$ide_previewer_path/util/EndianUtil.cpp", 37 "$ide_previewer_path/util/FileSystem.cpp", 38 "$ide_previewer_path/util/Interrupter.cpp", 39 "$ide_previewer_path/util/JsonReader.cpp", 40 "$ide_previewer_path/util/ModelManager.cpp", 41 "$ide_previewer_path/util/PreviewerEngineLog.cpp", 42 "$ide_previewer_path/util/PublicMethods.cpp", 43 "$ide_previewer_path/util/SharedDataManager.cpp", 44 "$ide_previewer_path/util/TimeTool.cpp", 45 "$ide_previewer_path/util/TraceTool.cpp", 46 "$ide_previewer_path/util/unix/CrashHandler.cpp", 47 "$ide_previewer_path/util/unix/LocalDate.cpp", 48 "$ide_previewer_path/util/unix/NativeFileSystem.cpp", 49 "CallbackQueueTest.cpp", 50 "CommandParserTest.cpp", 51 "CppTimerManagerTest.cpp", 52 "CppTimerTest.cpp", 53 "CrashHandlerTest.cpp", 54 "EndianUtilTest.cpp", 55 "JsonReaderTest.cpp", 56 "LocalDateTest.cpp", 57 "ModelManagerTest.cpp", 58 "NativeFileSystemTest.cpp", 59 "PublicMethodsTest.cpp", 60 "SharedDataTest.cpp", 61 "TimeToolTest.cpp", 62 "TraceToolTest.cpp", 63 ] 64 include_dirs = [ 65 "$ide_previewer_path/test/mock", 66 "$ide_previewer_path/util", 67 "$ide_previewer_path/util/linux", 68 "$ide_previewer_path/util/unix", 69 "//third_party/cJSON", 70 "//third_party/bounds_checking_function/include", 71 ] 72 deps = [ 73 "//third_party/bounds_checking_function:libsec_static", 74 "//third_party/cJSON:cjson_static", 75 ] 76 libs = [] 77 cflags = [] 78 cflags_cc = [] 79 ldflags = [] 80} 81