| # Copyright 2016 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/components/fuchsia_test_package.gni") |
| import("//build/test.gni") |
| import("//src/graphics/lib/magma/gnbuild/magma.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":compact-image-tests", |
| ":image-pipe-swapchain-hermetic-tests", |
| ":image-pipe-swapchain-tests", |
| ] |
| } |
| |
| fuchsia_unittest_package("compact-image-tests") { |
| manifest = "meta/compact-image-tests.cmx" |
| deps = [ |
| ":test_compact_image", |
| "//src/lib/vulkan/compact_image:compact_image_layer", |
| "//src/lib/vulkan/validation_layers", |
| ] |
| test_specs = { |
| # Currently only ARM GPU driver implements the FUCHSIA_memory_control |
| # extension which is required for the tests. |
| environments = arm_gpu_envs |
| } |
| } |
| |
| test("test_compact_image") { |
| output_name = "compact-image-tests" |
| sources = [ "test_compact_image.cc" ] |
| deps = [ |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/lib/vulkan", |
| ] |
| } |
| |
| fuchsia_unittest_package("image-pipe-swapchain-tests") { |
| manifest = "meta/image-pipe-swapchain-tests.cmx" |
| deps = [ |
| ":test_image_pipe_swapchain", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_copy_layer", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_fb_layer", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_layer", |
| "//src/lib/vulkan/validation_layers", |
| ] |
| test_specs = { |
| environments = [ aemu_env ] + magma_libvulkan_hardware_envs |
| } |
| } |
| |
| test("test_image_pipe_swapchain") { |
| output_name = "image-pipe-swapchain-tests" |
| sources = [ |
| "test_extensions.cc", |
| "test_imagepipe_view.cc", |
| "test_surface.cc", |
| "test_swapchain.cc", |
| ] |
| deps = [ |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/lib/vulkan", |
| "//src/lib/vulkan/imagepipe_view", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| test("test_image_pipe_swapchain_hermetic") { |
| output_name = "image-pipe-swapchain-hermetic-tests" |
| sources = [ "test_hermetic_surface.cc" ] |
| deps = [ |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/lib/vulkan", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_unittest_package("image-pipe-swapchain-hermetic-tests") { |
| manifest = "meta/image-pipe-swapchain-test-hermetic.cml" |
| deps = [ |
| ":test_image_pipe_swapchain_hermetic", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_fb_layer", |
| "//src/lib/vulkan/validation_layers", |
| "//src/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-component", |
| ] |
| test_specs = { |
| environments = [ aemu_env ] + magma_libvulkan_hardware_envs |
| } |
| } |