blob: 3876d29420bfb464464d36358e4cc56ee70e6b89 [file]
# Copyright 2019 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/rust/rustc_test.gni")
# `process_builder_test` and `process-builder-tests` remain in GN because
# `process-builder-tests` depends on `//src/lib/elf_parse:static_pie_test_util`
# (which requires `//sdk/lib/c:static`) and `//src/sys/testing/elftest`, which
# are not yet migrated to Bazel.
rustc_test("process_builder_test") {
name = "process_builder_lib_test"
edition = "2024"
deps = [
":test-util-fidl_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_rust",
"//sdk/rust/zx",
"//src/lib/elf_parse",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-runtime",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:zerocopy",
]
sources = [
"src/elf_load.rs",
"src/lib.rs",
"src/process_args.rs",
"src/process_builder.rs",
"src/util.rs",
]
}
fuchsia_unittest_package("process-builder-tests") {
manifest = "meta/process_builder_tests.cml"
deps = [
":process_builder_test",
":test_util",
"//src/lib/elf_parse:static_pie_test_util",
"//src/sys/testing/elftest",
]
# Needed for fuchsia.kernel.RootJob
test_type = "system"
}
group("tests") {
testonly = true
deps = [ ":process-builder-tests" ]
}
## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ##
#
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
#
# AUTO-GENERATED - DO NOT EDIT
#
# The targets below are auto-generated based on the targets defined in the
# BUILD.bazel file from the same directory. If you made changes to targets in
# Bazel, instead of editing this file manually, run:
#
# > fx bazel2gn
#
# Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and
# rerun bazel2gn.
import("//build/tools/bazel2gn/bazel_migration.gni")
rustc_library("process_builder") {
sources = [
"src/elf_load.rs",
"src/lib.rs",
"src/process_args.rs",
"src/process_builder.rs",
"src/util.rs",
]
edition = "2024"
visibility = [
":*",
"//src/bringup/*",
"//src/starnix/kernel/core:*",
"//src/sys/*",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_rust",
"//sdk/rust/zx",
"//src/lib/elf_parse",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-runtime",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:zerocopy",
]
}
fidl("test-util-fidl") {
testonly = true
sources = [ "test-utils/test_util.test.fidl" ]
excluded_checks = [
"string-bounds-not-specified",
"vector-bounds-not-specified",
]
name = "test.processbuilder"
}
rustc_binary("test_util") {
testonly = true
sources = [ "test-utils/test_util.rs" ]
output_name = "process_builder_test_util"
source_root = "test-utils/test_util.rs"
edition = "2024"
deps = [
":test-util-fidl_rust",
"//sdk/rust/zx",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-runtime",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
}