1# Copyright (c) 2022 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("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17ohos_unittest("frame_analyzer_test") {
18  module_out_path = "graphic_2d/rosen/modules/frame_analyzer"
19
20  include_dirs = [ "$graphic_2d_root/rosen/modules/frame_analyzer/src" ]
21
22  sources = [
23    "frame_collector_test.cpp",
24    "frame_painter_test.cpp",
25    "frame_saver_test.cpp",
26  ]
27
28  deps = [
29    "//foundation/graphic/graphic_2d/rosen/modules/frame_analyzer:libframe_analyzer",
30    "//foundation/graphic/graphic_2d/utils/test_header:test_header",
31  ]
32  external_deps = [
33    "hilog:libhilog",
34    "skia:skia_canvaskit",
35  ]
36
37  if (defined(use_rosen_drawing) && use_rosen_drawing) {
38    defines = [ "USE_ROSEN_DRAWING" ]
39    deps += [ "../../../modules/2d_graphics:2d_graphics" ]
40  }
41
42  cflags = [
43    "-Wall",
44    "-Werror",
45    "-g3",
46    "-Dprivate=public",
47    "-Dprotected=public",
48  ]
49
50  part_name = "graphic_2d"
51  subsystem_name = "graphic"
52}
53
54group("unittest") {
55  testonly = true
56
57  deps = [ ":frame_analyzer_test" ]
58}
59