blob: 577c05779f09795683620a295a28a00de96c249a [file] [log] [blame]
# 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.
import("//build/config/fuchsia/zircon_images.gni")
import("//build/unification/zbi/migrated_zbi_test.gni")
# Dopplegangers of zbi tests declared in the ZN build.
migrated_zbi_test("core-tests") {
args = [
"userboot=test/core/standalone-test",
"kernel.enable-debugging-syscalls=true",
]
deps = [
":kernel",
":test.core.standalone-test-zbi",
]
reference = "core-tests"
}
if (current_cpu == "x64") {
migrated_zbi_test("core-tests-hpet") {
args = [
"userboot=test/core/standalone-test",
"kernel.wallclock=hpet",
"kernel.enable-debugging-syscalls=true",
]
deps = [
":kernel",
":test.core.standalone-test-zbi",
]
reference = "core-tests-hpet"
}
}
# Used to include a kernel in zbi's.
group("kernel") {
metadata = {
migrated_zbi_input_args = [
"--type=container",
rebase_path(zircon_kernel_zbi, root_build_dir),
]
}
}
# Targets in this group are added to the list of tests automatically run.
group("tests") {
testonly = true
deps = [
"//zircon/system/core/bootsvc/test:bootsvc-integration-tests",
"//zircon/system/core/bootsvc/test:bootsvc-root-job-test",
"//zircon/system/utest/mexec:zbi-child-image",
"//zircon/system/utest/mexec:zbi-parent-image",
]
}
# Targets in this group are always built.
# This is mostly to ensure tests that haven't yet been migrated are in sync with
# their ZN counterparts.
group("zbi") {
testonly = true
deps = [
":core-tests",
":tests",
]
if (current_cpu == "x64") {
deps += [ ":core-tests-hpet" ]
}
}
# Artifacts imported from the ZN build which may be added to ZBI tests.
zbiables = [
"bin.svchost",
"driver.fragment",
"driver.fragment.proxy",
"test.core.standalone-test",
]
foreach(target, zbiables) {
label = "//build/unification/images:$target"
out_dir = get_label_info(label, "target_out_dir")
group("$target-zbi") {
deps = [ label ]
metadata = {
migrated_zbi_input_args = [
"--prefix=",
"--files",
rebase_path("$out_dir/$target.unification.manifest", root_build_dir),
]
}
}
}