blob: 0d112ed1cba65ec221836df1584403b4afe8ae26 [file]
# 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.
load("//build/bazel/rules/cc:fx_cc_binary.bzl", "fx_cc_binary")
load(
"//build/bazel/rules/components:fx_component.bzl",
"fx_component",
"fx_component_manifest",
)
load("//build/bazel/rules/packages:fx_package.bzl", "fx_package")
load(
"//build/bazel/rules/packages:fx_packaged_binary.bzl",
"fx_packaged_binary",
)
package(default_applicable_licenses = ["//:license"])
fx_cc_binary(
name = "passing_test",
testonly = True,
srcs = ["passing_test.cc"],
build_flags = ["//build/config/lto:no-fat-lto-objects-linking"],
)
fx_packaged_binary(
name = "passing_test_packaged_bin",
testonly = True,
binary = ":passing_test",
binary_name = "passing_test",
)
fx_component_manifest(
name = "passing_test_component-manifest",
testonly = True,
component_name = "passing_test",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/passing_test.cml",
)
fx_component(
name = "passing_test_component",
testonly = True,
compiled_manifest = ":passing_test_component-manifest",
deps = [":passing_test_packaged_bin"],
)
fx_cc_binary(
name = "failing_test",
testonly = True,
srcs = ["failing_test.cc"],
build_flags = ["//build/config/lto:no-fat-lto-objects-linking"],
)
fx_packaged_binary(
name = "failing_test_packaged_bin",
testonly = True,
binary = ":failing_test",
binary_name = "failing_test",
)
fx_component_manifest(
name = "failing_test_component-manifest",
testonly = True,
component_name = "failing_test",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/failing_test.cml",
)
fx_component(
name = "failing_test_component",
testonly = True,
compiled_manifest = ":failing_test_component-manifest",
deps = [":failing_test_packaged_bin"],
)
fx_cc_binary(
name = "arg_test",
testonly = True,
srcs = ["arg_test.cc"],
build_flags = ["//build/config/lto:no-fat-lto-objects-linking"],
)
fx_packaged_binary(
name = "arg_test_packaged_bin",
testonly = True,
binary = ":arg_test",
binary_name = "arg_test",
)
fx_component_manifest(
name = "arg_test_component-manifest",
testonly = True,
component_name = "arg_test",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/arg_test.cml",
)
fx_component(
name = "arg_test_component",
testonly = True,
compiled_manifest = ":arg_test_component-manifest",
deps = [":arg_test_packaged_bin"],
)
fx_cc_binary(
name = "environ_test",
testonly = True,
srcs = ["environ_test.cc"],
build_flags = ["//build/config/lto:no-fat-lto-objects-linking"],
)
fx_packaged_binary(
name = "environ_test_packaged_bin",
testonly = True,
binary = ":environ_test",
binary_name = "environ_test",
)
fx_component_manifest(
name = "environ_test_component-manifest",
testonly = True,
component_name = "environ_test",
includes = [
"//sdk/lib/sys/testing:elf_test_runner.shard.cml",
"//sdk/lib/syslog:client.shard",
],
manifest = "meta/environ_test.cml",
)
fx_component(
name = "environ_test_component",
testonly = True,
compiled_manifest = ":environ_test_component-manifest",
deps = [":environ_test_packaged_bin"],
)
fx_cc_binary(
name = "ambient_exec_test",
testonly = True,
srcs = ["ambient_exec_test.cc"],
build_flags = ["//build/config/lto:no-fat-lto-objects-linking"],
target_compatible_with = ["@platforms//os:fuchsia"],
deps = ["//zircon/system/ulib/zx"],
)
fx_packaged_binary(
name = "ambient_exec_test_packaged_bin",
testonly = True,
binary = ":ambient_exec_test",
binary_name = "ambient_exec_test",
)
fx_component_manifest(
name = "ambient_exec_test_component-manifest",
testonly = True,
component_name = "ambient_exec_test",
includes = ["//sdk/lib/syslog:client.shard"],
manifest = "meta/ambient_exec_test.cml",
)
fx_component(
name = "ambient_exec_test_component",
testonly = True,
compiled_manifest = ":ambient_exec_test_component-manifest",
deps = [":ambient_exec_test_packaged_bin"],
)
fx_component_manifest(
name = "ambient_exec_test_fail_component-manifest",
testonly = True,
component_name = "ambient_exec_test_fail",
includes = ["//sdk/lib/syslog:client.shard"],
manifest = "meta/ambient_exec_test_fail.cml",
)
fx_component(
name = "ambient_exec_test_fail_component",
testonly = True,
compiled_manifest = ":ambient_exec_test_fail_component-manifest",
deps = [":ambient_exec_test_packaged_bin"],
)
fx_package(
name = "elf-test-runner-example-tests",
testonly = True,
components = [
":ambient_exec_test_component",
":ambient_exec_test_fail_component",
":arg_test_component",
":environ_test_component",
":failing_test_component",
":passing_test_component",
],
visibility = ["//src/sys/test_runners/elf/tests:__pkg__"],
)