|
4 | 4 |
|
5 | 5 | if (is_fuchsia) { |
6 | 6 | import("//build/fuchsia/sdk.gni") |
| 7 | + import("$flutter_root/tools/fuchsia/fuchsia_archive.gni") |
7 | 8 | } |
8 | | - |
9 | 9 | import("$flutter_root/testing/testing.gni") |
10 | 10 |
|
11 | 11 | source_set("flow") { |
@@ -102,30 +102,102 @@ test_fixtures("flow_fixtures") { |
102 | 102 | fixtures = [] |
103 | 103 | } |
104 | 104 |
|
| 105 | +source_set("flow_testing") { |
| 106 | + testonly = true |
| 107 | + |
| 108 | + sources = [ |
| 109 | + "testing/layer_test.h", |
| 110 | + "testing/mock_layer.cc", |
| 111 | + "testing/mock_layer.h", |
| 112 | + "testing/mock_texture.cc", |
| 113 | + "testing/mock_texture.h", |
| 114 | + "testing/skia_gpu_object_layer_test.cc", |
| 115 | + "testing/skia_gpu_object_layer_test.h", |
| 116 | + ] |
| 117 | + |
| 118 | + public_deps = [ |
| 119 | + ":flow", |
| 120 | + "$flutter_root/testing:skia", |
| 121 | + "//third_party/googletest:gtest", |
| 122 | + ] |
| 123 | +} |
| 124 | + |
105 | 125 | executable("flow_unittests") { |
106 | 126 | testonly = true |
107 | 127 |
|
108 | 128 | sources = [ |
109 | 129 | "flow_run_all_unittests.cc", |
110 | 130 | "flow_test_utils.cc", |
111 | 131 | "flow_test_utils.h", |
| 132 | + "layers/backdrop_filter_layer_unittests.cc", |
| 133 | + "layers/clip_path_layer_unittests.cc", |
| 134 | + "layers/clip_rect_layer_unittests.cc", |
| 135 | + "layers/clip_rrect_layer_unittests.cc", |
| 136 | + "layers/color_filter_layer_unittests.cc", |
| 137 | + "layers/container_layer_unittests.cc", |
| 138 | + "layers/layer_tree_unittests.cc", |
112 | 139 | "layers/layer_unittests.cc", |
| 140 | + "layers/opacity_layer_unittests.cc", |
113 | 141 | "layers/performance_overlay_layer_unittests.cc", |
114 | 142 | "layers/physical_shape_layer_unittests.cc", |
| 143 | + "layers/picture_layer_unittests.cc", |
| 144 | + "layers/platform_view_layer_unittests.cc", |
| 145 | + "layers/shader_mask_layer_unittests.cc", |
| 146 | + "layers/texture_layer_unittests.cc", |
| 147 | + "layers/transform_layer_unittests.cc", |
115 | 148 | "matrix_decomposition_unittests.cc", |
116 | 149 | "mutators_stack_unittests.cc", |
117 | 150 | "raster_cache_unittests.cc", |
118 | 151 | "skia_gpu_object_unittests.cc", |
| 152 | + "testing/mock_layer_unittests.cc", |
| 153 | + "testing/mock_texture_unittests.cc", |
119 | 154 | "texture_unittests.cc", |
120 | 155 | ] |
121 | 156 |
|
122 | 157 | deps = [ |
123 | 158 | ":flow", |
124 | 159 | ":flow_fixtures", |
| 160 | + ":flow_testing", |
125 | 161 | "$flutter_root/fml", |
| 162 | + "$flutter_root/testing:skia", |
126 | 163 | "$flutter_root/testing:testing_lib", |
127 | 164 | "//third_party/dart/runtime:libdart_jit", # for tracing |
128 | 165 | "//third_party/googletest:gtest", |
129 | 166 | "//third_party/skia", |
130 | 167 | ] |
131 | 168 | } |
| 169 | + |
| 170 | +if (is_fuchsia) { |
| 171 | + fuchsia_archive("flow_tests") { |
| 172 | + testonly = true |
| 173 | + |
| 174 | + deps = [ |
| 175 | + ":flow_unittests", |
| 176 | + ] |
| 177 | + |
| 178 | + binary = "flow_unittests" |
| 179 | + |
| 180 | + libraries = common_libs |
| 181 | + |
| 182 | + meta_dir = "$flutter_root/testing/fuchsia/meta" |
| 183 | + cmx_file = "$meta_dir/fuchsia_test.cmx" |
| 184 | + |
| 185 | + resources = [ |
| 186 | + { |
| 187 | + path = rebase_path( |
| 188 | + "$flutter_root/testing/resources/performance_overlay_gold_60fps.png") |
| 189 | + dest = "flutter/testing/resources/performance_overlay_gold_60fps.png" |
| 190 | + }, |
| 191 | + { |
| 192 | + path = rebase_path( |
| 193 | + "$flutter_root/testing/resources/performance_overlay_gold_90fps.png") |
| 194 | + dest = "flutter/testing/resources/performance_overlay_gold_90fps.png" |
| 195 | + }, |
| 196 | + { |
| 197 | + path = rebase_path( |
| 198 | + "$flutter_root/testing/resources/performance_overlay_gold_120fps.png") |
| 199 | + dest = "flutter/testing/resources/performance_overlay_gold_120fps.png" |
| 200 | + }, |
| 201 | + ] |
| 202 | + } |
| 203 | +} |
0 commit comments