blob: d68f78a0c17e550de486c0e3f95e373ec5b3bdae [file] [log] [blame]
Tim Windelschmidt82e6af72024-07-23 00:05:42 +00001load("@io_bazel_rules_go//go:def.bzl", "go_test")
Tim Windelschmidtbed76d92025-02-18 03:04:14 +01002load("//osbase/build/mkpayload:def.bzl", "efi_unified_kernel_image")
Mateusz Zalega43e21072021-10-08 18:05:29 +02003
4go_test(
Tim Windelschmidt82e6af72024-07-23 00:05:42 +00005 name = "test_test",
Mateusz Zalega898125b2022-04-25 13:38:35 +02006 size = "medium",
Tim Windelschmidt82e6af72024-07-23 00:05:42 +00007 srcs = ["run_test.go"],
Mateusz Zalega43e21072021-10-08 18:05:29 +02008 data = [
Mateusz Zalega098a8632021-12-08 15:51:24 +01009 ":kernel",
Jan Schär5fdca562025-04-14 11:33:29 +000010 "//metropolis/installer/test/testos:testos_image",
Tim Windelschmidt82e6af72024-07-23 00:05:42 +000011 "//third_party/edk2:OVMF_CODE.fd",
12 "//third_party/edk2:OVMF_VARS.fd",
Mateusz Zalega43e21072021-10-08 18:05:29 +020013 ],
Mateusz Zalegaedffbb52022-01-11 15:27:22 +010014 importpath = "source.monogon.dev/metropolis/installer/test",
Mateusz Zalega43e21072021-10-08 18:05:29 +020015 visibility = ["//visibility:private"],
Tim Windelschmidt82e6af72024-07-23 00:05:42 +000016 x_defs = {
17 "xOvmfVarsPath": "$(rlocationpath //third_party/edk2:OVMF_VARS.fd )",
18 "xOvmfCodePath": "$(rlocationpath //third_party/edk2:OVMF_CODE.fd )",
Tim Windelschmidt82e6af72024-07-23 00:05:42 +000019 "xInstallerPath": "$(rlocationpath :kernel )",
Jan Schär5fdca562025-04-14 11:33:29 +000020 "xImagePath": "$(rlocationpath //metropolis/installer/test/testos:testos_image )",
Tim Windelschmidt82e6af72024-07-23 00:05:42 +000021 },
Mateusz Zalega43e21072021-10-08 18:05:29 +020022 deps = [
Lorenz Brund13c1c62022-03-30 19:58:58 +020023 "//metropolis/cli/metroctl/core",
Lorenz Brund13c1c62022-03-30 19:58:58 +020024 "//metropolis/proto/api",
Tim Windelschmidtc2290c22024-08-15 19:56:00 +020025 "//osbase/build/mkimage/osimage",
Tim Windelschmidt9f21f532024-05-07 15:14:20 +020026 "//osbase/cmd",
Jan Schär5fdca562025-04-14 11:33:29 +000027 "//osbase/oci",
Jan Schär4b888262025-05-13 09:12:03 +000028 "//osbase/oci/osimage",
Jan Schärc1b6df42025-03-20 08:52:18 +000029 "//osbase/structfs",
Lorenz Brund13c1c62022-03-30 19:58:58 +020030 "@com_github_diskfs_go_diskfs//:go-diskfs",
31 "@com_github_diskfs_go_diskfs//disk",
32 "@com_github_diskfs_go_diskfs//partition/gpt",
Tim Windelschmidt156248b2025-01-10 00:27:45 +010033 "@io_bazel_rules_go//go/runfiles",
Mateusz Zalega43e21072021-10-08 18:05:29 +020034 ],
35)
Mateusz Zalega098a8632021-12-08 15:51:24 +010036
37efi_unified_kernel_image(
38 name = "kernel",
Lorenz Brunc07d74e2023-08-03 17:41:23 +020039 cmdline = "quiet console=ttyS0",
Lorenz Brun304d42c2022-02-24 17:53:08 +010040 initrd = ["//metropolis/installer:initramfs"],
Mateusz Zalega098a8632021-12-08 15:51:24 +010041 kernel = "//third_party/linux",
42 visibility = ["//visibility:private"],
43)