blob: 6df6c7864a139d7ed57942d6afc1775bec5527dd [file] [log] [blame]
# Copyright 2019 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/host.gni")
import("//build/images/vbmeta.gni")
import("//build/testing/host_test_data.gni")
import("//src/sys/pkg/tests/system-tests/system-tests.gni")
if (is_host) {
host_test_data("test_tools") {
sources = [
"//prebuilt/tools/artifacts/artifacts",
"//prebuilt/tools/lkg/lkg",
]
outputs = [ "$root_out_dir/test_data/system-tests/{{source_file_part}}" ]
}
non_go_deps = [
":test_tools",
"//src/developer/ffx:test_data",
"//src/developer/ffx/plugins/repository:ffx_repository_tool_test_data",
]
if (use_vbmeta) {
host_test_data("test_avb_atx_metadata") {
sources = [ avb_atx_metadata ]
outputs = [ "$root_out_dir/test_data/system-tests/avb_atx_metadata.bin" ]
}
host_test_data("test_avb_key") {
sources = [ avb_key ]
outputs = [ "$root_out_dir/test_data/system-tests/atx_psk.pem" ]
}
non_go_deps += [
":test_avb_atx_metadata",
":test_avb_key",
]
}
group("non_go_deps") {
testonly = true
deps = non_go_deps
}
# This target adds tool_paths.json entries for the system test binaries; by
# default, test binaries do not show up in tool_paths.json. This allows the
# infrastructure to discover and distribute the tests as prebuilts, so the
# tests can be run in other repositories.
group("system_tests_tools") {
testonly = true
tools = [
{
dir = "reboot_test"
label = "system_tests_reboot"
},
{
dir = "recovery_test"
label = "system_tests_recovery"
},
{
dir = "upgrade_test"
label = "system_tests_upgrade"
},
]
metadata = {
tool_paths = []
foreach(tool, tools) {
tool_paths += [
{
cpu = host_cpu
label = get_label_info("${tool.dir}:${tool.label}",
"label_with_toolchain")
name = tool.label
os = host_os
path = rebase_path("${host_out_dir}/${tool.label}", root_build_dir)
},
]
}
}
}
}
group("system_tests") {
testonly = true
deps = [
"reboot_test:system_tests_reboot($host_toolchain)",
"recovery_test:system_tests_recovery($host_toolchain)",
"upgrade_test:system_tests_upgrade($host_toolchain)",
]
}
if (is_linux || is_mac) {
system_test_reboot_suite("workstation-release-reboot") {
environments = [
# These are disabled on NUCs to preserve hardware capacity.
#{
# dimensions = {
# device_type = "Intel NUC Kit NUC7i5DNHE"
# }
# tags = [ "e2e-isolated" ]
#},
{
dimensions = {
device_type = "GCE"
}
tags = [ "e2e-isolated" ]
},
]
timeout = "10m"
cycle_count = "5"
cycle_timeout = "2m"
}
system_test_recovery_suite("workstation-release-recovery") {
environments = [
{
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
tags = [ "e2e-isolated-recovery" ]
},
]
timeout = "10m"
cycle_count = "5"
cycle_timeout = "2m"
}
system_test_reboot_suite("workstation-release-reboot-longevity") {
environments = [
{
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
tags = [ "e2e-isolated-longevity" ]
},
]
timeout = "4h"
cycle_count = "100"
cycle_timeout = "2m"
}
system_test_upgrade_suite("workstation-release-upgrade") {
downgrade_release_builder =
"fuchsia/global.ci/workstation_eng.x64-release-e2e-isolated"
environments = [
# These are disabled on NUCs to preserve hardware capacity.
#{
# dimensions = {
# device_type = "Intel NUC Kit NUC7i5DNHE"
# }
# tags = [ "e2e-isolated" ]
#},
{
dimensions = {
device_type = "GCE"
}
tags = [ "e2e-isolated" ]
},
]
pave_timeout = "10m"
cycle_count = "1"
cycle_timeout = "10m"
# We use flashing instead of paving as GCE does not support paving.
use_flash = true
}
system_test_upgrade_suite("workstation-release-upgrade-longevity") {
downgrade_release_builder =
"fuchsia/global.ci/core.x64-release-nuc_in_basic_envs"
environments = [
{
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
tags = [ "e2e-isolated-longevity" ]
},
]
timeout = "4h"
pave_timeout = "10m"
cycle_count = "40"
cycle_timeout = "10m"
}
system_test_upgrade_suite("workstation-release-upgrade-omaha") {
downgrade_release_builder =
"fuchsia/global.ci/workstation_eng.x64-release-e2e-isolated-omaha"
installer = "omaha"
environments = [
{
dimensions = {
device_type = "Intel NUC Kit NUC7i5DNHE"
}
tags = [ "e2e-isolated-omaha" ]
},
]
pave_timeout = "10m"
cycle_count = "1"
cycle_timeout = "10m"
}
}
group("tests") {
testonly = true
public_deps = [
":system_tests",
"//src/testing/sl4f",
# The run-emu scripts depend on make-fuchsia-vol being compiled to work.
"//tools/make-fuchsia-vol($host_toolchain)",
# TODO(https://fxbug.dev/42055411) Re-enable these tests when they can be made blocking.
":workstation-release-reboot($host_toolchain)",
#":workstation-release-reboot-longevity($host_toolchain)",
":workstation-release-upgrade($host_toolchain)",
#":workstation-release-upgrade-longevity($host_toolchain)",
#":workstation-release-upgrade-omaha($host_toolchain)",
]
}