| # 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("cpp") { | |
| deps = [ ":inspect_cpp_codelab" ] | |
| } | |
| group("hermetic_tests") { | |
| testonly = true | |
| deps = [ | |
| ":inspect_cpp_codelab_integration_tests", | |
| ":inspect_cpp_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 = "inspect_cpp_codelab_" + part + "_unittest" | |
| part_integration_test = "inspect_cpp_codelab_" + part + "_integration_test" | |
| fuchsia_unittest_component(part_unittest) { | |
| deps = [ part + ":unittests" ] | |
| } | |
| 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_cpp_codelab") { | |
| deps = [ | |
| "client:components", | |
| "fizzbuzz", | |
| ] + parts | |
| } | |
| fuchsia_test_package("inspect_cpp_codelab_unittests") { | |
| test_components = unittest_components | |
| } | |
| fuchsia_test_package("inspect_cpp_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" | |
| } | |
| } | |
| } |