• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/jsapp"
17
18group("jsapp_unittest") {
19  testonly = true
20  deps = [ ":jsapp_rich_test" ]
21}
22
23ide_unittest("jsapp_rich_test") {
24  testonly = true
25  part_name = "previewer"
26  subsystem_name = "ide"
27  module_out_path = module_output_path
28  output_name = "jsapp_rich"
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/jsapp/JsApp.cpp",
35    "$ide_previewer_path/jsapp/rich/JsAppImpl.cpp",
36    "$ide_previewer_path/jsapp/rich/external/EventHandler.cpp",
37    "$ide_previewer_path/jsapp/rich/external/EventQueue.cpp",
38    "$ide_previewer_path/jsapp/rich/external/EventRunner.cpp",
39    "$ide_previewer_path/jsapp/rich/external/StageContext.cpp",
40    "$ide_previewer_path/mock/KeyInput.cpp",
41    "$ide_previewer_path/mock/MouseInput.cpp",
42    "$ide_previewer_path/mock/MouseWheel.cpp",
43    "$ide_previewer_path/mock/VirtualMessage.cpp",
44    "$ide_previewer_path/test/mock/MockFile.cpp",
45    "$ide_previewer_path/test/mock/MockGlobalResult.cpp",
46    "$ide_previewer_path/test/mock/ability/MockSimulator.cpp",
47    "$ide_previewer_path/test/mock/arkui/MockAceAbility.cpp",
48    "$ide_previewer_path/test/mock/arkui/MockAcePreviewHelper.cpp",
49    "$ide_previewer_path/test/mock/graphic/MockGlfwRenderContext.cpp",
50    "$ide_previewer_path/test/mock/mock/MockKeyInputImpl.cpp",
51    "$ide_previewer_path/test/mock/mock/MockMouseInputImpl.cpp",
52    "$ide_previewer_path/test/mock/mock/MockMouseWheelImpl.cpp",
53    "$ide_previewer_path/test/mock/mock/MockVirtualMessageImpl.cpp",
54    "$ide_previewer_path/test/mock/mock/MockVirtualScreen.cpp",
55    "$ide_previewer_path/test/mock/mock/MockVirtualScreenImpl.cpp",
56    "$ide_previewer_path/test/mock/util/MockClipboardHelper.cpp",
57    "$ide_previewer_path/test/mock/util/MockLocalSocket.cpp",
58    "$ide_previewer_path/test/mock/util/MockWebSocketServer.cpp",
59    "$ide_previewer_path/test/mock/window/MockWindow.cpp",
60    "$ide_previewer_path/test/mock/window/MockWindowDisplay.cpp",
61    "$ide_previewer_path/test/mock/window/MockWindowModel.cpp",
62    "$ide_previewer_path/util/CallbackQueue.cpp",
63    "$ide_previewer_path/util/CommandParser.cpp",
64    "$ide_previewer_path/util/CppTimer.cpp",
65    "$ide_previewer_path/util/CppTimerManager.cpp",
66    "$ide_previewer_path/util/FileSystem.cpp",
67    "$ide_previewer_path/util/Interrupter.cpp",
68    "$ide_previewer_path/util/JsonReader.cpp",
69    "$ide_previewer_path/util/PreviewerEngineLog.cpp",
70    "$ide_previewer_path/util/SharedDataManager.cpp",
71    "$ide_previewer_path/util/TimeTool.cpp",
72    "$ide_previewer_path/util/TraceTool.cpp",
73    "$ide_previewer_path/util/unix/LocalDate.cpp",
74    "$ide_previewer_path/util/unix/NativeFileSystem.cpp",
75    "EventHandlerTest.cpp",
76    "JsAppImplTest.cpp",
77    "StageContextTest.cpp",
78  ]
79  include_dirs = [
80    "$ide_previewer_path/test/mock",
81    "$ide_previewer_path/test/mock/window",
82    "$ide_previewer_path/cli",
83    "$ide_previewer_path/util",
84    "//third_party/libwebsockets/include",
85    "//third_party/cJSON",
86    "//third_party/bounds_checking_function/include",
87    "//third_party/zlib",
88  ]
89  include_dirs += graphic_2d_include_path
90  include_dirs += window_manager_include_path
91  include_dirs += ability_runtime_include_path
92  include_dirs += ace_engine_include_path
93  include_dirs += [
94    "$ide_previewer_path/jsapp",
95    "$ide_previewer_path/jsapp/rich",
96    "$ide_previewer_path/jsapp/rich/external",
97    "$ide_previewer_path/mock",
98    "$ide_previewer_path/mock/rich",
99  ]
100  deps = [
101    "//third_party/bounds_checking_function:libsec_static",
102    "//third_party/cJSON:cjson_static",
103    "//third_party/zlib:libz",
104  ]
105  libs = [ "X11" ]
106  cflags = [
107    "-Wno-error=overflow",
108    "-fno-exceptions",
109  ]
110  cflags_cc = [
111    "-Wno-error=overflow",
112    "-fno-exceptions",
113  ]
114  ldflags = [ "-Wno-error=overflow" ]
115}
116