blob: e7704b4c908074ac782d9fd8f653cab37e2693ef [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() {
# Whether to include tests that are known to fail on NUC with ASan.
# Should be set to false in the infra builders that have board == "x64" and
# "asan" in variants.
include_tests_that_fail_on_nuc_asan = true
# The list of environment names to include in "basic_envs".
basic_env_names = [ "emu" ]
}
_all_named_envs = []
### Individual test environments
# Please keep alphabetized.
aemu_env = {
dimensions = {
device_type = "AEMU"
}
}
_all_named_envs += [
{
name = "aemu"
env = aemu_env
},
]
astro_env = {
dimensions = {
device_type = "Astro"
}
}
_all_named_envs += [
{
name = "astro"
env = astro_env
},
]
linux_env = {
dimensions = {
os = "Linux"
cpu = current_cpu
}
}
_all_named_envs += [
{
name = "linux"
env = linux_env
},
]
luis_env = {
dimensions = {
device_type = "Luis"
}
}
_all_named_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_envs += [
{
name = "mac"
env = mac_env
},
]
nelson_env = {
dimensions = {
device_type = "Nelson"
}
}
_all_named_envs += [
{
name = "nelson"
env = nelson_env
},
]
nuc_env = {
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
}
_all_named_envs += [
{
name = "nuc"
env = nuc_env
},
]
qemu_env = {
dimensions = {
device_type = "QEMU"
}
}
_all_named_envs += [
{
name = "qemu"
env = qemu_env
},
]
sherlock_env = {
dimensions = {
device_type = "Sherlock"
}
}
_all_named_envs += [
{
name = "sherlock"
env = sherlock_env
},
]
### END Individual test environments
### Aliases ###
if (host_os == "linux") {
host_env = linux_env
} else if (host_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_envs += [
{
name = "emu"
env = emu_env
},
]
### Select environment lists ###
# Tests that fail on a NUC in ASan but otherwise want to run on a NUC should
# use this.
nuc_env_fails_on_asan = []
if (include_tests_that_fail_on_nuc_asan) {
nuc_env_fails_on_asan += [ nuc_env ]
}
basic_envs = []
foreach(name, basic_env_names) {
foreach(named_env, _all_named_envs) {
if (name == named_env.name) {
basic_envs += [ named_env.env ]
}
}
}