blob: b4f3e4d8bcc1f1a64307f025f9f14f058824846e [file] [log] [blame]
# 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/board.gni")
declare_args() {
# The list of environment names to include in "basic_envs".
basic_env_names = [ "emu" ]
}
_all_named_fuchsia_envs = []
_all_named_host_envs = []
### Individual test environments
# Please keep alphabetized.
aemu_env = {
dimensions = {
device_type = "AEMU"
}
}
_all_named_fuchsia_envs += [
{
name = "aemu"
env = aemu_env
},
]
astro_env = {
dimensions = {
device_type = "Astro"
}
}
_all_named_fuchsia_envs += [
{
name = "astro"
env = astro_env
},
]
linux_env = {
dimensions = {
os = "Linux"
cpu = current_cpu
}
}
_all_named_host_envs += [
{
name = "linux"
env = linux_env
},
]
luis_env = {
dimensions = {
device_type = "Luis"
}
}
_all_named_fuchsia_envs += [
{
name = "luis"
env = luis_env
},
]
mac_env = {
dimensions = {
os = "Mac"
cpu = current_cpu
}
# When running tests for a mac build, we only wish to run mac tests; we attach
# the "mac" tag in that case to filter out other tests.
tags = [ "mac" ]
}
_all_named_host_envs += [
{
name = "mac"
env = mac_env
},
]
nelson_env = {
dimensions = {
device_type = "Nelson"
}
}
_all_named_fuchsia_envs += [
{
name = "nelson"
env = nelson_env
},
]
nuc_env = {
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
}
_all_named_fuchsia_envs += [
{
name = "nuc"
env = nuc_env
},
]
qemu_env = {
dimensions = {
device_type = "QEMU"
}
}
_all_named_fuchsia_envs += [
{
name = "qemu"
env = qemu_env
},
]
sherlock_env = {
dimensions = {
device_type = "Sherlock"
}
}
_all_named_fuchsia_envs += [
{
name = "sherlock"
env = sherlock_env
},
]
vim3_env = {
dimensions = {
device_type = "Vim3"
}
}
_all_named_fuchsia_envs += [
{
name = "vim3"
env = vim3_env
},
]
gce_env = {
dimensions = {
device_type = "GCE"
}
}
_all_named_fuchsia_envs += [
{
name = "gce"
env = gce_env
},
]
atlas_env = {
dimensions = {
device_type = "Atlas"
}
}
_all_named_fuchsia_envs += [
{
name = "atlas"
env = atlas_env
},
]
### END Individual test environments
### Aliases ###
if (current_os == "linux") {
host_env = linux_env
} else if (current_os == "mac") {
host_env = mac_env
}
# Allow selection of AEMU as the default EMU.
emu_env = qemu_env
if (target_cpu == "x64") {
emu_env = {
}
emu_env = aemu_env
}
_all_named_fuchsia_envs += [
{
name = "emu"
env = emu_env
},
]
with_display_envs = [
aemu_env,
astro_env,
atlas_env,
luis_env,
nelson_env,
nuc_env,
sherlock_env,
vim3_env,
]
chromebook_envs = [ atlas_env ]
### Select environment lists ###
all_fuchsia_envs = []
foreach(named_env, _all_named_fuchsia_envs) {
all_fuchsia_envs += [ named_env.env ]
}
# TODO(https://fxbug.dev/80243): allow these tests to run on emulators.
#
# On ARM nested virtualization is unsupported before ARMv8.2. None of our
# testbeds are ARM8.2 or above.
#
# On x64 doing so today would involve 3 levels of virtualization:
#
# 1. GCE virtualizes Linux (as part of its standard ops)
# 2. Linux virtualizes Zircon (QEMU/KVM)
# 3. Zircon virtualizes guest Zircon/Linux (Machina)
guest_envs = all_fuchsia_envs - [
aemu_env,
qemu_env,
# TODO(https://fxbug.dev/86601): GCE theoretically supports
# virtualization, but it currently fails on Fuchsia.
gce_env,
]
basic_envs = []
foreach(name, basic_env_names) {
foreach(named_env, _all_named_fuchsia_envs + _all_named_host_envs) {
if (name == named_env.name) {
basic_envs += [ named_env.env ]
}
}
}