| # Copyright 2018 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/build_id.gni") |
| import("//build/package.gni") |
| import("//garnet/lib/magma/gnbuild/magma.gni") |
| import("resources.gni") |
| |
| action("build") { |
| script = "build.sh" |
| args = [ |
| rebase_path(root_out_dir), |
| current_cpu, |
| host_cpu, |
| host_os, |
| ] |
| deps = [ |
| "//sdk:zircon_sysroot_export", |
| "//src/graphics/lib/vulkan", |
| "//zircon/public/lib/fdio:fdio_sdk", |
| ] |
| |
| depfile = "$root_out_dir/build-vulkancts/vulkan-cts.d" |
| outputs = [ |
| "$root_out_dir/build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk", |
| "$root_out_dir/build-vulkancts/executor/executor", |
| "$root_out_dir/build-vulkancts/execserver/execserver", |
| "$root_out_dir/build-vulkancts/cases/dEQP-VK-cases.xml", |
| ] |
| } |
| |
| copy("copy") { |
| sources = [ |
| "$root_out_dir/build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk", |
| ] |
| outputs = [ |
| "$root_build_dir/vulkan-cts", |
| ] |
| deps = [ |
| ":build", |
| ] |
| } |
| |
| build_id_entry("vulkan_cts_build_id") { |
| deps = [ |
| ":copy", |
| ] |
| debug = "$root_build_dir/vulkan-cts" |
| } |
| |
| build_id_entry("executor_build_id") { |
| deps = [ |
| ":build", |
| ] |
| debug = "$root_out_dir/build-vulkancts/executor/executor" |
| } |
| |
| build_id_entry("execserver_build_id") { |
| deps = [ |
| ":build", |
| ] |
| debug = "$root_out_dir/build-vulkancts/execserver/execserver" |
| } |
| |
| # Add a label of "vulkan-cts" for each environment given in the list |
| # of general hardware environments for magma tests. The label ensures |
| # that the Vulkan CTS will not be run in the general test pipeline; |
| # the label will be keyed on so that the suite may be run in a special |
| # builder. |
| labeled_magma_hardware_envs = [] |
| foreach(env, magma_hardware_envs) { |
| labeled_env = { |
| } # Clear from previous iteration. |
| labeled_env = { |
| forward_variables_from(env, "*") |
| if (defined(tags)) { |
| tags += [ "vulkan-cts" ] |
| } else { |
| tags = [ "vulkan-cts" ] |
| } |
| } |
| labeled_magma_hardware_envs += [ labeled_env ] |
| } |
| |
| # To run on device: run fuchsia-pkg://fuchsia.com/vulkan-cts#meta/vulkan-cts.cmx |
| # The following command line args are provided by the cmx: |
| # --deqp-caselist-file=/pkg/data/vk-default-1.1.3.txt --deqp-log-images=disable --deqp-log-shader-sources=disable --deqp-log-filename=/data/TestResults.qpa |
| # To run the 1.0.2 CTS: "run fuchsia-pkg://fuchsia.com/vulkan-cts#meta/vulkan-cts-1.0.2.cmx" |
| package("vulkan-cts-unified") { |
| package_name = "vulkan-cts" |
| deps = [ |
| ":copy", |
| ":vulkan_cts_build_id", |
| ] |
| tests = [ |
| { |
| name = "vulkan-cts" |
| environments = labeled_magma_hardware_envs |
| }, |
| { |
| # This executable is the same as above, but allows runtests to recognize that a second test |
| # exists (if disabled wasn't here). |
| name = "vulkan-cts" |
| dest = "vulkan-cts-1.0.2" |
| disabled = true |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/vulkan-cts.cmx") |
| dest = "vulkan-cts.cmx" |
| }, |
| { |
| path = rebase_path("meta/vulkan-cts-1.0.2.cmx") |
| dest = "vulkan-cts-1.0.2.cmx" |
| }, |
| { |
| path = rebase_path("meta/vulkan-cts-no-args.cmx") |
| dest = "vulkan-cts-no-args.cmx" |
| }, |
| ] |
| resources = cts_resources |
| } |
| |
| group("vulkan-cts") { |
| if (target_cpu == "arm64") { |
| # This takes a while to build, so only try building it on ARM64, where it's necessary. |
| deps = [ |
| "split-cts:vulkan-cts-split", |
| ] |
| } else { |
| deps = [ |
| ":vulkan-cts-unified", |
| ] |
| } |
| } |
| |
| # To run on device: |
| # run vulkan-cts-executor --start-server=/pkg/bin/execserver --testset=dEQP-VK.* --caselistdir=/pkg/data/cases --out=/data/TestLog.qpa --info=/data/infolog.txt --binaryname=/pkg/bin/deqp-vk --workdir=/data |
| # Note: the list of cases may include tests that aren't in vk-default.txt "mustpass". |
| package("vulkan-cts-executor") { |
| deps = [ |
| ":build", |
| ":execserver_build_id", |
| ":executor_build_id", |
| ":vulkan_cts_build_id", |
| ] |
| |
| binary = "build-vulkancts/executor/executor" |
| binaries = [ |
| { |
| name = "deqp-vk" |
| source = "$root_out_dir/build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk" |
| }, |
| { |
| name = "execserver" |
| source = "$root_out_dir/build-vulkancts/execserver/execserver" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/vulkan-cts-executor.cmx") |
| dest = "vulkan-cts-executor.cmx" |
| }, |
| ] |
| resources = cts_resources |
| |
| resources += [ |
| { |
| path = |
| rebase_path("$root_out_dir/build-vulkancts/cases/dEQP-VK-cases.xml") |
| dest = "cases/dEQP-VK-cases.xml" |
| }, |
| ] |
| } |
| |
| # On device: |
| # run vulkan-cts-execserver |
| # Run on host: |
| # executor/executor --connect=192.168.42.80 --testset=dEQP-VK.* --caselistdir=cases/ --binaryname=/pkg/bin/deqp-vk --workdir=/data --cmdline="--deqp-log-images=disable --deqp-log-shader-sources=disable" |
| # Note: the list of cases may include tests that aren't in vk-default.txt "mustpass". |
| package("vulkan-cts-execserver") { |
| deps = [ |
| ":build", |
| ":execserver_build_id", |
| ":executor_build_id", |
| ":vulkan_cts_build_id", |
| ] |
| |
| binary = "build-vulkancts/execserver/execserver" |
| binaries = [ |
| { |
| name = "deqp-vk" |
| source = "$root_out_dir/build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/vulkan-cts-execserver.cmx") |
| dest = "vulkan-cts-execserver.cmx" |
| }, |
| ] |
| resources = cts_resources |
| |
| resources += [ |
| { |
| path = |
| rebase_path("$root_out_dir/build-vulkancts/cases/dEQP-VK-cases.xml") |
| dest = "cases/dEQP-VK-cases.xml" |
| }, |
| ] |
| } |
| |
| group("fuchsia") { |
| testonly = true |
| public_deps = [ |
| ":vulkan-cts", |
| ":vulkan-cts-execserver", |
| ":vulkan-cts-executor", |
| "//garnet/packages/prod:vulkan", |
| ] |
| } |