blob: 7b7828d139430d1ee008532c4ccc45479d4ea999 [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",
"//metropolis/installer/test/testos:testos_bundle",
"//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 )",
"xBundlePath": "$(rlocationpath //metropolis/installer/test/testos:testos_bundle )",
},
deps = [
"//metropolis/cli/metroctl/core",
"//metropolis/proto/api",
"//osbase/build/mkimage/osimage",
"//osbase/cmd",
"//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"],
)