| # 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 = [] |
| |
| # The 'enum' of supported device types. These values, like all referenced under |
| # environment dimensions, are known to Infrastructure. |
| device_types = { |
| aemu = "AEMU" |
| astro = "Astro" |
| atlas = "Atlas" |
| crosvm = "crosvm" |
| gce = "GCE" |
| iris = "Iris" |
| kola = "Kola" |
| lilac = "Lilac" |
| luis = "Luis" |
| maple = "Maple" |
| nelson = "Nelson" |
| nuc7 = "Intel NUC Kit NUC7i5DNHE" |
| nuc11 = "Intel NUC Kit NUC11TNHv5" |
| qemu = "QEMU" |
| sherlock = "Sherlock" |
| sorrel = "Sorrel" |
| vim3 = "Vim3" |
| } |
| |
| ### Individual test environments |
| # Please keep alphabetized. |
| |
| aemu_env = { |
| dimensions = { |
| device_type = device_types.aemu |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "aemu" |
| env = aemu_env |
| }, |
| ] |
| |
| astro_env = { |
| dimensions = { |
| device_type = device_types.astro |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "astro" |
| env = astro_env |
| }, |
| ] |
| |
| crosvm_env = { |
| dimensions = { |
| device_type = device_types.crosvm |
| } |
| } |
| |
| # TODO(https://fxbug.dev/371274109): Unconditionally add when arm64 crosvm |
| # support is present. |
| if (target_cpu == "x64") { |
| _all_named_fuchsia_envs += [ |
| { |
| name = "crosvm" |
| env = crosvm_env |
| }, |
| ] |
| } |
| |
| bt_lacewing_sherlock_env = { |
| dimensions = { |
| device_type = device_types.sherlock |
| pool = "fuchsia.tests.bluetooth" |
| sherlocks = "2" |
| testbed = "lacewing_bt_Sherlock" |
| } |
| } |
| |
| bt_lacewing_vim3_env = { |
| dimensions = { |
| device_type = device_types.vim3 |
| pool = "fuchsia.tests.bluetooth" |
| vim3s = "2" |
| testbed = "lacewing_bt_vim3" |
| } |
| } |
| |
| bt_lacewing_sorrel_env = { |
| dimensions = { |
| device_type = device_types.sorrel |
| pool = "fuchsia.tests.bluetooth" |
| sorrels = "2" |
| testbed = "lacewing_bt_Sorrel" |
| } |
| } |
| |
| wlan_astro_ap_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.astro |
| access_points = "1" |
| } |
| } |
| |
| wlan_astro_ap_iperf_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.astro |
| access_points = "1" |
| iperf_servers = "1" |
| } |
| } |
| |
| wlan_astro_ap_iperf_attenuator_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.astro |
| access_points = "1" |
| iperf_servers = "1" |
| attenuators = "1" |
| } |
| } |
| |
| wlan_sherlock_ap_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.sherlock |
| access_points = "1" |
| } |
| } |
| |
| wlan_sherlock_ap_iperf_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.sherlock |
| access_points = "1" |
| iperf_servers = "1" |
| } |
| } |
| |
| wlan_sherlock_ap_iperf_attenuator_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.sherlock |
| access_points = "1" |
| iperf_servers = "1" |
| attenuators = "1" |
| } |
| } |
| |
| wlan_nelson_ap_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nelson |
| access_points = "1" |
| } |
| } |
| |
| wlan_nelson_ap_iperf_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nelson |
| access_points = "1" |
| iperf_servers = "1" |
| } |
| } |
| |
| wlan_nelson_ap_iperf_attenuator_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nelson |
| access_points = "1" |
| iperf_servers = "1" |
| attenuators = "1" |
| } |
| } |
| |
| wlan_nuc11_ap_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nuc11 |
| access_points = "1" |
| } |
| } |
| |
| wlan_nuc11_ap_iperf_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nuc11 |
| access_points = "1" |
| iperf_servers = "1" |
| } |
| } |
| |
| wlan_nuc11_ap_iperf_attenuator_env = { |
| dimensions = { |
| pool = "fuchsia.tests.connectivity" |
| device_type = device_types.nuc11 |
| access_points = "1" |
| iperf_servers = "1" |
| attenuators = "1" |
| } |
| } |
| |
| wlan_sorrel_ap_env = { |
| dimensions = { |
| access_points = "1" |
| device_type = device_types.sorrel |
| pool = "fuchsia.tests.connectivity" |
| } |
| } |
| |
| wlan_sorrel_ap_env_testbed_prototype = { |
| dimensions = { |
| access_points = "1" |
| device_type = device_types.sorrel |
| pool = "fuchsia.dev.tests.connectivity.openwrt" |
| } |
| } |
| |
| linux_env = { |
| dimensions = { |
| os = "Linux" |
| cpu = current_cpu |
| } |
| } |
| _all_named_host_envs += [ |
| { |
| name = "linux" |
| env = linux_env |
| }, |
| ] |
| |
| iris_env = { |
| dimensions = { |
| device_type = device_types.iris |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "iris" |
| env = iris_env |
| }, |
| ] |
| |
| luis_env = { |
| dimensions = { |
| device_type = device_types.luis |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "luis" |
| env = luis_env |
| }, |
| ] |
| |
| kola_env = { |
| dimensions = { |
| device_type = device_types.kola |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "kola" |
| env = kola_env |
| }, |
| ] |
| |
| lilac_env = { |
| dimensions = { |
| device_type = device_types.lilac |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "lilac" |
| env = lilac_env |
| }, |
| ] |
| |
| kudzu_env = { |
| dimensions = { |
| device_type = device_types.maple |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "kudzu" |
| env = kudzu_env |
| }, |
| ] |
| |
| maple_env = { |
| dimensions = { |
| device_type = device_types.maple |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "maple" |
| env = maple_env |
| }, |
| ] |
| |
| sorrel_env = { |
| dimensions = { |
| device_type = device_types.sorrel |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "sorrel" |
| env = sorrel_env |
| }, |
| ] |
| |
| nelson_env = { |
| dimensions = { |
| device_type = device_types.nelson |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "nelson" |
| env = nelson_env |
| }, |
| ] |
| |
| nuc7_env = { |
| dimensions = { |
| device_type = device_types.nuc7 |
| } |
| } |
| |
| _all_named_fuchsia_envs += [ |
| { |
| name = "nuc7" |
| env = nuc7_env |
| }, |
| ] |
| |
| nuc11_env = { |
| dimensions = { |
| device_type = device_types.nuc11 |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "nuc11" |
| env = nuc11_env |
| }, |
| ] |
| |
| qemu_env = { |
| dimensions = { |
| device_type = device_types.qemu |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "qemu" |
| env = qemu_env |
| }, |
| ] |
| |
| qemu_1cpu_env = { |
| forward_variables_from(qemu_env, "*") |
| emulator = { |
| name = "1cpu" |
| device = "${board_name}-emu-min" |
| } |
| } |
| |
| sherlock_env = { |
| dimensions = { |
| device_type = device_types.sherlock |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "sherlock" |
| env = sherlock_env |
| }, |
| ] |
| |
| vim3_env = { |
| dimensions = { |
| device_type = device_types.vim3 |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "vim3" |
| env = vim3_env |
| }, |
| ] |
| |
| gce_env = { |
| dimensions = { |
| device_type = device_types.gce |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "gce" |
| env = gce_env |
| }, |
| ] |
| |
| atlas_env = { |
| dimensions = { |
| device_type = device_types.atlas |
| } |
| } |
| _all_named_fuchsia_envs += [ |
| { |
| name = "atlas" |
| env = atlas_env |
| }, |
| ] |
| |
| ### END Individual test environments |
| |
| ### Aliases ### |
| |
| if (current_os == "linux") { |
| host_env = linux_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, |
| nuc7_env, |
| nuc11_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| |
| # Devices that can run display capture. |
| with_display_capture_envs = [ |
| astro_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/42160566): 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/371274109): Unconditionally remove when |
| # unconditionally added. |
| if (target_cpu == "x64") { |
| guest_envs -= [ crosvm_env ] |
| } |
| |
| # Cavium CPUs seem to have inherrent quirks which fail some arguably correct |
| # tests. See: https://fxbug.dev/500450483. |
| # |
| # These envs allow us to not run those tests only on Caviums, it's a roundabout |
| # selection because we can not directly filter for the underlying CPU make and |
| # model. This selection only creates an env that doesn't involve emulators, and |
| # additional config is needed for the test to be actually skipped. |
| cavium_skip_envs = [] |
| if (target_cpu == "arm64") { |
| cavium_skip_envs = [ |
| aemu_env, |
| qemu_env, |
| ] |
| } |
| |
| # Skips no envs if not arm64, skips cavium_skip_envs if arm64. |
| all_fuchsia_except_cavium_skip_envs = all_fuchsia_envs - cavium_skip_envs |
| |
| # Set of environments where both virtualization and vulkan are available. |
| guest_vulkan_envs = guest_envs - [ |
| nuc11_env, |
| gce_env, |
| ] |
| |
| # Set of environments for Lacewing Bluetooth multi-device testing. |
| lacewing_bluetooth_envs = [ |
| bt_lacewing_sherlock_env, |
| bt_lacewing_vim3_env, |
| bt_lacewing_sorrel_env, |
| ] |
| |
| # TODO(https://fxbug.dev/465744822): Each environment should be specified in |
| # a product_bundle_test_group individually instead of adding all environments |
| # to each test. |
| wlan_ap_envs = [ |
| wlan_astro_ap_env, |
| wlan_sherlock_ap_env, |
| wlan_nelson_ap_env, |
| wlan_nuc11_ap_env, |
| wlan_sorrel_ap_env, |
| ] |
| |
| # TODO(https://fxbug.dev/465744822): Each environment should be specified in |
| # a product_bundle_test_group individually instead of adding all environments |
| # to each test. |
| wlan_ap_iperf_envs = [ |
| wlan_astro_ap_iperf_env, |
| wlan_sherlock_ap_iperf_env, |
| wlan_nelson_ap_iperf_env, |
| wlan_nuc11_ap_iperf_env, |
| ] |
| |
| # TODO(https://fxbug.dev/465744822): Each environment should be specified in |
| # a product_bundle_test_group individually instead of adding all environments |
| # to each test. |
| wlan_ap_iperf_attenuator_envs = [ |
| wlan_astro_ap_iperf_attenuator_env, |
| wlan_sherlock_ap_iperf_attenuator_env, |
| wlan_nelson_ap_iperf_attenuator_env, |
| wlan_nuc11_ap_iperf_attenuator_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 ] |
| } |
| } |
| } |