| # Copyright 2022 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/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/testing/environments.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [] |
| |
| # //tools/emulator only works on linux. |
| # The installer only works on x64 targets. |
| if (host_os == "linux" && target_cpu == "x64") { |
| deps += [ ":installer_test($host_toolchain)" ] |
| } |
| } |
| |
| if (is_linux) { |
| go_library("lib") { |
| testonly = true |
| sources = [ "installer_test.go" ] |
| deps = [ "//tools/emulator/emulatortest" ] |
| } |
| |
| host_test_data("installer_image") { |
| sources = |
| [ "$root_build_dir/obj/build/installer_images/installer_images.img" ] |
| |
| deps = [ "//build/installer_images:installer_images($target_toolchain)" ] |
| } |
| |
| go_test("installer_test") { |
| gopackages = [ "go.fuchsia.dev/fuchsia/src/tests/installer" ] |
| deps = [ |
| ":lib", |
| "//tools/virtual_device", |
| "//tools/virtual_device:proto", |
| ] |
| non_go_deps = [ ":installer_image" ] |
| |
| # The installer test is really slow. |
| timeout = "60m" |
| environments = [ |
| { |
| dimensions = linux_env.dimensions |
| tags = [ "slow" ] |
| }, |
| ] |
| } |
| } |