blob: 15b0d25597ce06a37bdc751b8d6ae69be5e948eb [file] [log] [blame]
# Copyright 2025 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/fidl/fidl.gni")
import("//build/rust/rustc_test.gni")
import("//src/starnix/build/starnix_linux_executable.gni")
import("//src/starnix/kernel/starnix.gni")
group("tests") {
testonly = true
deps = [ ":starnix_psi_integration_test" ]
}
rustc_test("psi_integration_test_bin") {
testonly = true
edition = "2021"
source_root = "src/tests.rs"
sources = [
"src/event_waiter.rs",
"src/fake_psi_provider.rs",
"src/puppet.rs",
"src/tests.rs",
]
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust",
"//sdk/fidl/fuchsia.process:fuchsia.process_rust",
"//sdk/fidl/fuchsia.starnix.psi:fuchsia.starnix.psi_rust",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-runtime",
"//src/sys/lib/component-events",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:itertools",
"//third_party/rust_crates:log",
"//third_party/rust_crates:test-case",
]
}
fuchsia_test_component("psi_test") {
manifest = "meta/integration_test.cml"
deps = [ ":psi_integration_test_bin" ]
test_type = "starnix"
}
fuchsia_component("container") {
testonly = true
manifest = "//src/starnix/containers/debian/meta/debian_container.cml"
}
starnix_linux_executable("linux_psi_puppet") {
testonly = true
sources = [ "src/puppet.cc" ]
deps = [
"//src/lib/files",
"//src/lib/fxl",
]
}
fuchsia_component("puppet") {
testonly = true
manifest = "meta/puppet.cml"
deps = [ ":linux_psi_puppet" ]
}
fuchsia_component("test_realm") {
testonly = true
manifest = "meta/test_realm.cml"
}
fuchsia_test_package("starnix_psi_integration_test") {
test_components = [ ":psi_test" ]
deps = [
":container",
":puppet",
":test_realm",
"//src/starnix/containers/debian:container_resources",
]
subpackages = [ "//src/starnix/kernel:starnix_kernel_package" ]
}