| # Copyright 2020 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. |
| |
| assert(is_fuchsia, "These targets are only compiled in the fuchsia toolchain.") |
| |
| import("//build/components.gni") |
| |
| group("rust") { |
| deps = [ ":inspect_rust_codelab" ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| ":inspect_rust_codelab_integration_tests", |
| ":inspect_rust_codelab_unittests", |
| ] |
| } |
| |
| part_ids = [ |
| 1, |
| 2, |
| 3, |
| 4, |
| 5, |
| ] |
| parts = [] |
| unittest_components = [] |
| integration_test_components = [] |
| |
| foreach(part_id, part_ids) { |
| part = "part_" + part_id |
| part_unittest = part + "_unittest" |
| part_integration_test = part + "_integration_test" |
| |
| fuchsia_unittest_component(part_unittest) { |
| deps = [ part + ":bin_test" ] |
| } |
| |
| fuchsia_unittest_component(part_integration_test) { |
| manifest = part + "/meta/integration_test.cml" |
| deps = [ |
| "fizzbuzz", |
| part, |
| part + ":integration_test", |
| ] |
| } |
| |
| unittest_components += [ ":" + part_unittest ] |
| integration_test_components += [ ":" + part_integration_test ] |
| parts += [ part ] |
| } |
| |
| fuchsia_package("inspect_rust_codelab") { |
| deps = [ |
| "client:components", |
| "fizzbuzz", |
| ] + parts |
| } |
| |
| fuchsia_test_package("inspect_rust_codelab_unittests") { |
| test_components = unittest_components |
| } |
| |
| fuchsia_test_package("inspect_rust_codelab_integration_tests") { |
| test_components = integration_test_components |
| |
| # There's expected error logs that happen in the integration test where PEER_CLOSED arises when |
| # testing without FizzBuzz being present. |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |