m/t/installer: deflake by silencing kernel logs
The installer test was failing due to the success flag getting broken
in two by the kernel logs, like this:
>TestOS launched successfully! _TESTOS_LAUNCH_SUC[ 0.963289] kvm:
>exiting hardware virtualizationCESS_
This change addresses this problem by setting an adequate loglevel for
both the installer and testos kernels.
m/t/installer/BUILD.bazel now defines its own unified kernel image
target with a custom kernel cmdline needed for test purposes.
Change-Id: I43547b6c81f8a1ebc4facb841a600b155af581df
Reviewed-on: https://review.monogon.dev/c/monogon/+/464
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/test/installer/BUILD.bazel b/metropolis/test/installer/BUILD.bazel
index 9b094a8..5763d75 100644
--- a/metropolis/test/installer/BUILD.bazel
+++ b/metropolis/test/installer/BUILD.bazel
@@ -1,10 +1,11 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("//metropolis/node/build:efi.bzl", "efi_unified_kernel_image")
go_test(
name = "installer",
size = "small",
data = [
- "//metropolis/node/installer:kernel",
+ ":kernel",
"//metropolis/test/installer/testos:testos_bundle",
"//third_party/edk2:firmware",
"@qemu//:qemu-x86_64-softmmu",
@@ -28,3 +29,11 @@
"@io_bazel_rules_go//go/tools/bazel:go_default_library",
],
)
+
+efi_unified_kernel_image(
+ name = "kernel",
+ cmdline = "loglevel=0 console=ttyS0",
+ initramfs = "//metropolis/node/installer:initramfs",
+ kernel = "//third_party/linux",
+ visibility = ["//visibility:private"],
+)