17c804472Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 27c804472Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 37c804472Sopenharmony_ci# you may not use this file except in compliance with the License. 47c804472Sopenharmony_ci# You may obtain a copy of the License at 57c804472Sopenharmony_ci# 67c804472Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 77c804472Sopenharmony_ci# 87c804472Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 97c804472Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 107c804472Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 117c804472Sopenharmony_ci# See the License for the specific language governing permissions and 127c804472Sopenharmony_ci# limitations under the License. 137c804472Sopenharmony_ci 147c804472Sopenharmony_ciimport("../../test.gni") 157c804472Sopenharmony_ci 167c804472Sopenharmony_cimodule_output_path = "previewer/mock" 177c804472Sopenharmony_ci 187c804472Sopenharmony_cigroup("mock_unittest") { 197c804472Sopenharmony_ci testonly = true 207c804472Sopenharmony_ci deps = [ ":mock_rich_test" ] 217c804472Sopenharmony_ci} 227c804472Sopenharmony_ci 237c804472Sopenharmony_ciide_unittest("mock_rich_test") { 247c804472Sopenharmony_ci testonly = true 257c804472Sopenharmony_ci part_name = "previewer" 267c804472Sopenharmony_ci subsystem_name = "ide" 277c804472Sopenharmony_ci module_out_path = module_output_path 287c804472Sopenharmony_ci output_name = "mock_rich" 297c804472Sopenharmony_ci sources = [ 307c804472Sopenharmony_ci "$graphic_2d_path/rosen/modules/platform/utils/refbase.cpp", 317c804472Sopenharmony_ci "$ide_previewer_path/cli/CommandLine.cpp", 327c804472Sopenharmony_ci "$ide_previewer_path/cli/CommandLineFactory.cpp", 337c804472Sopenharmony_ci "$ide_previewer_path/cli/CommandLineInterface.cpp", 347c804472Sopenharmony_ci "$ide_previewer_path/mock/KeyInput.cpp", 357c804472Sopenharmony_ci "$ide_previewer_path/mock/LanguageManager.cpp", 367c804472Sopenharmony_ci "$ide_previewer_path/mock/MouseInput.cpp", 377c804472Sopenharmony_ci "$ide_previewer_path/mock/MouseWheel.cpp", 387c804472Sopenharmony_ci "$ide_previewer_path/mock/VirtualMessage.cpp", 397c804472Sopenharmony_ci "$ide_previewer_path/mock/VirtualScreen.cpp", 407c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/KeyInputImpl.cpp", 417c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/LanguageManagerImpl.cpp", 427c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/MouseInputImpl.cpp", 437c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/MouseWheelImpl.cpp", 447c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/VirtualMessageImpl.cpp", 457c804472Sopenharmony_ci "$ide_previewer_path/mock/rich/VirtualScreenImpl.cpp", 467c804472Sopenharmony_ci "$ide_previewer_path/test/mock/MockGlobalResult.cpp", 477c804472Sopenharmony_ci "$ide_previewer_path/test/mock/ability/MockSimulator.cpp", 487c804472Sopenharmony_ci "$ide_previewer_path/test/mock/arkui/MockAceAbility.cpp", 497c804472Sopenharmony_ci "$ide_previewer_path/test/mock/arkui/MockAcePreviewHelper.cpp", 507c804472Sopenharmony_ci "$ide_previewer_path/test/mock/graphic/MockGlfwRenderContext.cpp", 517c804472Sopenharmony_ci "$ide_previewer_path/test/mock/jsapp/MockJsApp.cpp", 527c804472Sopenharmony_ci "$ide_previewer_path/test/mock/jsapp/MockJsAppImpl.cpp", 537c804472Sopenharmony_ci "$ide_previewer_path/test/mock/util/MockClipboardHelper.cpp", 547c804472Sopenharmony_ci "$ide_previewer_path/test/mock/util/MockKeyboardHelper.cpp", 557c804472Sopenharmony_ci "$ide_previewer_path/test/mock/util/MockLocalSocket.cpp", 567c804472Sopenharmony_ci "$ide_previewer_path/test/mock/util/MockWebSocketServer.cpp", 577c804472Sopenharmony_ci "$ide_previewer_path/util/CallbackQueue.cpp", 587c804472Sopenharmony_ci "$ide_previewer_path/util/CommandParser.cpp", 597c804472Sopenharmony_ci "$ide_previewer_path/util/CppTimer.cpp", 607c804472Sopenharmony_ci "$ide_previewer_path/util/CppTimerManager.cpp", 617c804472Sopenharmony_ci "$ide_previewer_path/util/EndianUtil.cpp", 627c804472Sopenharmony_ci "$ide_previewer_path/util/FileSystem.cpp", 637c804472Sopenharmony_ci "$ide_previewer_path/util/Interrupter.cpp", 647c804472Sopenharmony_ci "$ide_previewer_path/util/JsonReader.cpp", 657c804472Sopenharmony_ci "$ide_previewer_path/util/PreviewerEngineLog.cpp", 667c804472Sopenharmony_ci "$ide_previewer_path/util/SharedDataManager.cpp", 677c804472Sopenharmony_ci "$ide_previewer_path/util/TimeTool.cpp", 687c804472Sopenharmony_ci "$ide_previewer_path/util/TraceTool.cpp", 697c804472Sopenharmony_ci "$ide_previewer_path/util/unix/LocalDate.cpp", 707c804472Sopenharmony_ci "$ide_previewer_path/util/unix/NativeFileSystem.cpp", 717c804472Sopenharmony_ci "KeyInputImplTest.cpp", 727c804472Sopenharmony_ci "LanguageManagerImplTest.cpp", 737c804472Sopenharmony_ci "MouseInputImplTest.cpp", 747c804472Sopenharmony_ci "MouseWheelImplTest.cpp", 757c804472Sopenharmony_ci "VirtualScreenImplTest.cpp", 767c804472Sopenharmony_ci ] 777c804472Sopenharmony_ci include_dirs = [ 787c804472Sopenharmony_ci "$ide_previewer_path/cli", 797c804472Sopenharmony_ci "$ide_previewer_path/util", 807c804472Sopenharmony_ci "//third_party/libwebsockets/include", 817c804472Sopenharmony_ci "//third_party/cJSON", 827c804472Sopenharmony_ci "//third_party/bounds_checking_function/include", 837c804472Sopenharmony_ci "//third_party/libjpeg-turbo/libjpeg-turbo-2.1.1", 847c804472Sopenharmony_ci ] 857c804472Sopenharmony_ci include_dirs += graphic_2d_include_path 867c804472Sopenharmony_ci include_dirs += window_manager_include_path 877c804472Sopenharmony_ci include_dirs += ability_runtime_include_path 887c804472Sopenharmony_ci include_dirs += ace_engine_include_path 897c804472Sopenharmony_ci include_dirs += [ 907c804472Sopenharmony_ci "$ide_previewer_path/test/mock", 917c804472Sopenharmony_ci "$ide_previewer_path/jsapp", 927c804472Sopenharmony_ci "$ide_previewer_path/jsapp/rich", 937c804472Sopenharmony_ci "$ide_previewer_path/mock", 947c804472Sopenharmony_ci "$ide_previewer_path/mock/rich", 957c804472Sopenharmony_ci ] 967c804472Sopenharmony_ci deps = [ 977c804472Sopenharmony_ci "//third_party/bounds_checking_function:libsec_static", 987c804472Sopenharmony_ci "//third_party/cJSON:cjson_static", 997c804472Sopenharmony_ci "//third_party/libjpeg-turbo:turbojpeg_static", 1007c804472Sopenharmony_ci ] 1017c804472Sopenharmony_ci libs = [ "X11" ] 1027c804472Sopenharmony_ci cflags = [ 1037c804472Sopenharmony_ci "-Wno-error=overflow", 1047c804472Sopenharmony_ci "-fno-exceptions", 1057c804472Sopenharmony_ci ] 1067c804472Sopenharmony_ci cflags_cc = [ 1077c804472Sopenharmony_ci "-Wno-error=overflow", 1087c804472Sopenharmony_ci "-fno-exceptions", 1097c804472Sopenharmony_ci ] 1107c804472Sopenharmony_ci ldflags = [ "-Wno-error=overflow" ] 1117c804472Sopenharmony_ci} 112