| # Copyright 2026 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/cpp/library_headers.gni") | |
| group("testing") { | |
| testonly = true | |
| public_deps = [ ":userboot-testing" ] | |
| } | |
| library_headers("headers") { | |
| testonly = true | |
| headers = [ | |
| "lib/userboot/testing/fixture.h", | |
| "lib/userboot/testing/launcher.h", | |
| ] | |
| public_deps = [ | |
| "//src/lib/elfldltl/testing", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| static_library("userboot-testing") { | |
| testonly = true | |
| public_deps = [ ":headers" ] | |
| sources = [ | |
| "fixture.cc", | |
| "get-executable.cc", | |
| "launcher.cc", | |
| "wait-for-termination.cc", | |
| ] | |
| configs += [ "//build/config:c++23" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", | |
| "//sdk/fidl/fuchsia.process:fuchsia.process_cpp", | |
| "//sdk/lib/component/incoming/cpp", | |
| "//sdk/lib/fdio", | |
| "//sdk/lib/ld:processargs", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| # The library doesn't really use death tests, but the gtest:death_test target | |
| # provides the same automatic manifest generation needed to launch processes | |
| # (as death tests do). | |
| data_deps = [ "//src/sys/test_runners/gtest:death_test" ] | |
| } |