| # 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/components.gni") |
| import("build/starnix_host_test_component.gni") |
| |
| group("chromiumos") { |
| deps = [ ":chromiumos_system_image" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "syscalls:tests" ] |
| |
| if (target_cpu == "x64") { |
| deps += [ ":test_chromiumos_distro" ] |
| } |
| } |
| |
| resource("chromiumos_system_image") { |
| sources = [ "//prebuilt/starnix/chromiumos-image-amd64/system.img" ] |
| outputs = [ "data/system.img" ] |
| } |
| |
| fuchsia_component("sh_test") { |
| testonly = true |
| check_references = false |
| deps = [ ":chromiumos_system_image" ] |
| manifest = "meta/sh_test.cml" |
| } |
| |
| if (host_os == "linux" && host_cpu == "x64") { |
| starnix_host_test_component("syscalls_test") { |
| test_label = "syscalls:syscalls_test" |
| } |
| |
| starnix_host_test_component("fdio-test") { |
| test_label = "//sdk/lib/fdio/tests:fdio-test" |
| } |
| } |
| |
| fuchsia_test_package("test_chromiumos_distro") { |
| deps = [ ":chromiumos_system_image" ] |
| |
| test_components = [ ":sh_test" ] |
| |
| # TODO(abarth): Remove !is_asan check when Starnix can run binaries built for |
| # ASAN. |
| if (host_os == "linux" && host_cpu == "x64" && !is_asan) { |
| test_components += [ |
| ":syscalls_test", |
| ":fdio-test", |
| ] |
| } |
| |
| # This package intentionally contains many non-Fuchia ELF binaries that |
| # are not under /data/, and some of them are even unstripped, so disable |
| # theses checks to build successfully. |
| disable_elf_binaries_checks = true |
| } |