| # Copyright 2026 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/board.gni") |
| import("//build/testing/environments.gni") |
| |
| declare_args() { |
| # A list of device types this build is allowed to run tests on. If set, only |
| # these device types will be used for tests. |
| allowed_test_device_types = [] |
| |
| # A list of host device types this build is allowed to run tests on. If set, |
| # only these host device types will be used for tests. |
| allowed_test_host_device_types = [] |
| } |
| |
| # A given board, by definition, restrict which devices it meant for. |
| # We constrain the allowed device types and the dimensions considered as |
| # a function of this. |
| # TODO(joshuaseaton): Use board_name instead of cpu in the reasoning above. |
| allowed_device_types = allowed_test_device_types |
| allowed_host_device_types = allowed_test_host_device_types |
| |
| # If the build specified no test device types, add the default set. |
| # If they _did_ specify test device types, don't add any. |
| if (allowed_device_types == []) { |
| if (board_name == "x64") { |
| allowed_device_types = [ |
| "AEMU", |
| "QEMU", |
| "Intel NUC Kit NUC11TNHv5", |
| "GCE", |
| "crosvm", |
| ] |
| } else if (board_name == "arm64") { |
| allowed_device_types = [ |
| "QEMU", |
| "GCE", |
| "crosvm", |
| ] |
| } else if (board_name == "riscv64") { |
| allowed_device_types = [ "QEMU" ] |
| } else if (board_name == "qemu-arm64") { |
| allowed_device_types = [ |
| "QEMU", |
| "crosvm", |
| ] |
| } else if (board_name == "astro") { |
| allowed_device_types = [ "Astro" ] |
| } else if (board_name == "luis") { |
| allowed_device_types = [ "Luis" ] |
| } else if (board_name == "sherlock") { |
| allowed_device_types = [ "Sherlock" ] |
| } else if (board_name == "nelson") { |
| allowed_device_types = [ "Nelson" ] |
| } else if (board_name == "vim3") { |
| allowed_device_types = [ "Vim3" ] |
| } else if (board_name == "chromebook-x64") { |
| allowed_device_types = [ "Atlas" ] |
| } else if (board_name == "kola") { |
| allowed_device_types = [ "Kola" ] |
| } else if (board_name == "lilac") { |
| allowed_device_types = [ "Lilac" ] |
| } else if (board_name == "maple") { |
| allowed_device_types = [ "Maple" ] |
| } else if (board_name == "sorrel") { |
| allowed_device_types = [ "Sorrel" ] |
| } else if (board_name == "iris") { |
| allowed_device_types = [ "Iris" ] |
| } |
| } |
| |
| # If the build specified no test host device types, add the default set. |
| if (allowed_host_device_types == []) { |
| if (board_name == "arm64" || board_name == "qemu-arm64") { |
| allowed_host_device_types = [ host_device_types.gcp_c4a_highmem_96_bm ] |
| } |
| } |