blob: 457c6dfbb5bb1d836985dadfedfae81654f807b2 [file] [log] [blame]
# 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/test.gni")
import("//build/zircon/migrated_targets.gni")
# TODO(fxbug.dev/54322): Keep in sync with BUILD.gn until the bootloader
# is fully migrated to the Fuchsia build.
source_set("src") {
sources = [
"abr.c",
"avb.c",
"bootimg.c",
"cmdline.c",
"compression.c",
"device_id.c",
"diskio.c",
"fastboot.c",
"framebuffer.c",
"inet6.c",
"misc.c",
"netboot.c",
"netifc.c",
"osboot.c",
"pci.c",
"utf_conversion.c",
"zircon.c",
]
include_dirs = [ "." ]
deps = [
"../lib",
"//src/firmware/lib/abr",
"//src/firmware/lib/zbi",
"//src/firmware/lib/zircon_boot",
"//third_party/android/platform/external/avb",
"//zircon/kernel/lib/efi",
"//zircon/system/public",
"//zircon/system/ulib/gfx-font-data",
"//zircon/system/ulib/tftp",
"//zircon/third_party/ulib/cksum",
"//zircon/third_party/ulib/lz4",
]
}
# MacOS is missing <endian.h>, so we don't build the tests for it.
if (!is_mac) {
test("gigaboot_test") {
# In order to make it easier to add tests incrementally, just add the source
# files we need here rather than depending on :src in full. This allows us to
# stub out the UEFI APIs as we need them, rather than all at once.
#
# Once we have enough functionality stubbed out host-side we can just depend
# on ":src" directly instead.
sources = [
"avb.c",
"avb_test.cc",
"compression.c",
"compression_test.cc",
"diskio.c",
"diskio_test.cc",
"utf_conversion.c",
]
include_dirs = [ "." ]
deps = [
"../host",
"//src/firmware/lib/zbi",
"//src/lib/fxl/test:gtest_main",
"//third_party/android/platform/external/avb",
"//third_party/googletest:gmock",
"//zircon/kernel/lib/efi",
"//zircon/kernel/lib/efi/testing",
"//zircon/third_party/ulib/lz4",
]
}
} else {
group("gigaboot_test") {
}
}