blob: 8aab4b4a09dc6db08cf19b607cab67a4b14f6312 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_test")
load("//osbase/build/mkpayload:def.bzl", "efi_unified_kernel_image")
go_test(
name = "test_test",
size = "medium",
srcs = ["run_test.go"],
data = [
":kernel",
"//build/toolchain/toolchain-bundle:qemu-kvm",
"//metropolis/installer/test/testos:testos_image",
"//third_party/edk2:OVMF_CODE.fd",
"//third_party/edk2:OVMF_VARS.fd",
],
importpath = "source.monogon.dev/metropolis/installer/test",
visibility = ["//visibility:private"],
x_defs = {
"xOvmfVarsPath": "$(rlocationpath //third_party/edk2:OVMF_VARS.fd )",
"xOvmfCodePath": "$(rlocationpath //third_party/edk2:OVMF_CODE.fd )",
"xInstallerPath": "$(rlocationpath :kernel )",
"xImagePath": "$(rlocationpath //metropolis/installer/test/testos:testos_image )",
"xQEMUPath": "$(rlocationpath //build/toolchain/toolchain-bundle:qemu-kvm )",
},
deps = [
"//metropolis/cli/metroctl/core",
"//metropolis/installer/install",
"//metropolis/proto/api",
"//osbase/cmd",
"//osbase/oci",
"//osbase/oci/osimage",
"//osbase/structfs",
"@com_github_diskfs_go_diskfs//:go-diskfs",
"@com_github_diskfs_go_diskfs//disk",
"@com_github_diskfs_go_diskfs//partition/gpt",
"@io_bazel_rules_go//go/runfiles",
],
)
efi_unified_kernel_image(
name = "kernel",
cmdline = "quiet console=ttyS0",
initrd = ["//metropolis/installer:initramfs"],
kernel = "//third_party/linux",
visibility = ["//visibility:private"],
)