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/cli" 17 18group("cli_unittest") { 19 testonly = true 20 deps = [ ":cli_test" ] 21} 22 23ide_unittest("cli_test") { 24 testonly = true 25 part_name = "previewer" 26 subsystem_name = "ide" 27 module_out_path = module_output_path 28 output_name = "cli" 29 sources = [ 30 "$graphic_2d_path/rosen/modules/platform/utils/refbase.cpp", 31 "$ide_previewer_path/cli/CommandLine.cpp", 32 "$ide_previewer_path/cli/CommandLineFactory.cpp", 33 "$ide_previewer_path/cli/CommandLineInterface.cpp", 34 "$ide_previewer_path/mock/KeyInput.cpp", 35 "$ide_previewer_path/mock/MouseInput.cpp", 36 "$ide_previewer_path/mock/MouseWheel.cpp", 37 "$ide_previewer_path/mock/VirtualMessage.cpp", 38 "$ide_previewer_path/test/mock/MockGlobalResult.cpp", 39 "$ide_previewer_path/test/mock/ability/MockSimulator.cpp", 40 "$ide_previewer_path/test/mock/arkui/MockAceAbility.cpp", 41 "$ide_previewer_path/test/mock/jsapp/MockJsApp.cpp", 42 "$ide_previewer_path/test/mock/jsapp/MockJsAppImpl.cpp", 43 "$ide_previewer_path/test/mock/mock/MockKeyInputImpl.cpp", 44 "$ide_previewer_path/test/mock/mock/MockMouseInputImpl.cpp", 45 "$ide_previewer_path/test/mock/mock/MockMouseWheelImpl.cpp", 46 "$ide_previewer_path/test/mock/mock/MockVirtualMessageImpl.cpp", 47 "$ide_previewer_path/test/mock/mock/MockVirtualScreen.cpp", 48 "$ide_previewer_path/test/mock/mock/MockVirtualScreenImpl.cpp", 49 "$ide_previewer_path/test/mock/util/MockLocalSocket.cpp", 50 "$ide_previewer_path/test/mock/util/MockWebSocketServer.cpp", 51 "$ide_previewer_path/test/mock/window/MockWindowDisplay.cpp", 52 "$ide_previewer_path/test/mock/window/MockWindowModel.cpp", 53 "$ide_previewer_path/util/CallbackQueue.cpp", 54 "$ide_previewer_path/util/CommandParser.cpp", 55 "$ide_previewer_path/util/CppTimer.cpp", 56 "$ide_previewer_path/util/CppTimerManager.cpp", 57 "$ide_previewer_path/util/FileSystem.cpp", 58 "$ide_previewer_path/util/Interrupter.cpp", 59 "$ide_previewer_path/util/JsonReader.cpp", 60 "$ide_previewer_path/util/PreviewerEngineLog.cpp", 61 "$ide_previewer_path/util/SharedDataManager.cpp", 62 "$ide_previewer_path/util/TimeTool.cpp", 63 "$ide_previewer_path/util/TraceTool.cpp", 64 "$ide_previewer_path/util/unix/LocalDate.cpp", 65 "$ide_previewer_path/util/unix/NativeFileSystem.cpp", 66 "CommandLineFactoryTest.cpp", 67 "CommandLineInterfaceTest.cpp", 68 "CommandLineTest.cpp", 69 ] 70 include_dirs = [ 71 "$ide_previewer_path/test/mock", 72 "$ide_previewer_path/cli", 73 "$ide_previewer_path/util", 74 "//third_party/libwebsockets/include", 75 "//third_party/cJSON", 76 "//third_party/bounds_checking_function/include", 77 ] 78 include_dirs += graphic_2d_include_path 79 include_dirs += window_manager_include_path 80 include_dirs += ability_runtime_include_path 81 include_dirs += ace_engine_include_path 82 include_dirs += [ 83 "$ide_previewer_path/jsapp", 84 "$ide_previewer_path/jsapp/rich", 85 "$ide_previewer_path/mock", 86 "$ide_previewer_path/mock/rich", 87 ] 88 deps = [ 89 "//third_party/bounds_checking_function:libsec_static", 90 "//third_party/cJSON:cjson_static", 91 ] 92 libs = [] 93 cflags = [ "-Wno-error=overflow" ] 94 cflags_cc = [ "-Wno-error=overflow" ] 95 ldflags = [ "-Wno-error=overflow" ] 96} 97