| # 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.gni") |
| import("//build/test.gni") |
| import("//src/lib/vulkan/vulkan.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":image-pipe-swapchain-hermetic-tests", |
| ":image-pipe-swapchain-tests", |
| ] |
| } |
| |
| fuchsia_unittest_package("image-pipe-swapchain-tests") { |
| manifest = "meta/image-pipe-swapchain-tests.cml" |
| deps = [ |
| ":test_image_pipe_swapchain", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_fb_layer", |
| "//src/lib/vulkan/swapchain:image_pipe_swapchain_layer", |
| "//src/lib/vulkan/validation_layers", |
| ] |
| test_specs = { |
| # Disabled on AEMU because of flaky emulator failures. |
| environments = vulkan_envs - [ aemu_env ] |
| } |
| test_type = "system" |
| } |
| |
| test("test_image_pipe_swapchain") { |
| output_name = "image-pipe-swapchain-tests" |
| sources = [ |
| "test_extensions.cc", |
| "test_flatland_view.cc", |
| "test_surface.cc", |
| ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/debug:backtrace-request", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/lib/testing/predicates", |
| "//src/lib/vulkan", |
| "//src/lib/vulkan/flatland_view", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| source_set("test_swapchain_hermetic") { |
| testonly = true |
| sources = [ |
| "fake_flatland.h", |
| "test_swapchain.cc", |
| ] |
| deps = [ |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/fdio", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fsl", |
| "//src/lib/vulkan", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| source_set("test_swapchain_hermetic_display") { |
| testonly = true |
| defines = [ "USE_IMAGEPIPE_DISPLAY=1" ] |
| sources = [ "test_swapchain.cc" ] |
| deps = [ |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/fdio", |
| "//src/lib/vulkan", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| test("test_image_pipe_swapchain_hermetic") { |
| output_name = "image-pipe-swapchain-hermetic-tests" |
| sources = [ "test_hermetic_surface.cc" ] |
| deps = [ |
| ":test_swapchain_hermetic", |
| ":test_swapchain_hermetic_display", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/debug:backtrace-request", |
| "//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/graphics/display/testing/fake-display-stack-host:child-component-with-default-config", |
| "//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 = vulkan_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_type = "vulkan" |
| } |