| # Copyright 2019 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/package.gni") |
| |
| package("unit_tests") { |
| testonly = true |
| deps = [ |
| ":virtmagma_unit_tests_linux(//build/toolchain:linux_x64)", |
| ] |
| |
| resources = [ |
| { |
| path = |
| rebase_path("${root_build_dir}/linux_x64/virtmagma_unit_tests_linux") |
| dest = "virtmagma_unit_tests_linux" |
| }, |
| ] |
| } |
| |
| executable("virtmagma_unit_tests_linux") { |
| # TODO(MA-586): formalize guest-targeted tests |
| testonly = true |
| |
| deps = [ |
| "//garnet/lib/magma/src/libmagma_linux", |
| "//src/graphics/lib/vulkan:headers", |
| "//third_party/googletest:gtest_main", |
| ] |
| |
| sources = [ |
| "virtmagma_unit_tests.cc", |
| ] |
| } |
| |
| executable("virtmagma_vulkan_unit_tests") { |
| testonly = true |
| |
| deps = [ |
| ":basic_compute", |
| "//src/graphics/lib/vulkan", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| |
| sources = [ |
| "virtmagma_vulkan_unit_tests.cc", |
| ] |
| } |
| |
| compiled_action("basic_compute") { |
| tool = "//third_party/shaderc/third_party/glslang:glslangValidator" |
| inputs = [ |
| "${target_name}.glsl", |
| ] |
| outputs = [ |
| "$target_gen_dir/${target_name}.h", |
| ] |
| args = [ |
| rebase_path("${target_name}.glsl", root_build_dir), |
| "-s", |
| "-S", |
| "comp", |
| "-V", |
| "-o", |
| rebase_path("$target_gen_dir/${target_name}.h", root_build_dir), |
| "--vn", |
| "${target_name}_spirv", |
| ] |
| } |
| |
| group("drm_unit_tests_linux_arm64") { |
| testonly = true |
| deps = [ |
| ":drm_unit_tests(//build/toolchain:linux_arm64)", |
| ] |
| } |
| |
| executable("drm_unit_tests") { |
| testonly = true |
| |
| deps = [ |
| "..:drm_test_runner", |
| "../../tests/unit_tests:magma_platform_device_test", |
| ] |
| } |