From 5b0235668e081feb335c7eee4d231200051601b9 Mon Sep 17 00:00:00 2001 From: Junjie Wu Date: Thu, 28 Sep 2023 11:38:17 -0700 Subject: [PATCH] [metalos][vm] provide multi-kernel test API for default VM Summary: The main reason I didn't want a multi-kernel API like antlir1 did is to avoid bloated parameters. Most tests only ever customize one or two parameters of the VM, but if we combine them together, it becomes a long list of parameters with defaults that no one will use at the same time. Thanks to comment on D49612785, I suddenly realized it shouldn't prevent me from getting the default VM wrapped in a more restricted API. This also nicely hide the target name I've been exposing to clients that can be satisfied with the default VM. Test Plan: CI should cover all tests. Double check that no test name changes. Reviewed By: epilatow Differential Revision: D49703243 fbshipit-source-id: a7067a769a0ccf93236ef1fe2b0ec4106cb35e00 --- antlir/antlir2/antlir2_vm/bzl/preconfigured.bzl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/antlir/antlir2/antlir2_vm/bzl/preconfigured.bzl b/antlir/antlir2/antlir2_vm/bzl/preconfigured.bzl index 08a355bac7..3ec71e81ab 100644 --- a/antlir/antlir2/antlir2_vm/bzl/preconfigured.bzl +++ b/antlir/antlir2/antlir2_vm/bzl/preconfigured.bzl @@ -3,19 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -load("//metalos/vm/kernels:versions.bzl", "VM_KERNELS") - # Lists pre-configured VM targets that any test can refer to based on their needs. # Refer to actual target for their detailed configuration. PRECONFIGURED_VM = { "disk-boot": "//antlir/antlir2/antlir2_vm:default-disk-boot", "nondisk-boot": "//antlir/antlir2/antlir2_vm:default-nondisk-boot", "nvme-disk-boot": "//antlir/antlir2/antlir2_vm:default-nvme-disk-boot", -} | { - # Must be kept in sync with metalos/vm/TARGETS - "kernel-{}-vm".format(uname): "//metalos/vm:kernel-{}-vm".format(uname) - for arch, uname in VM_KERNELS - if arch != "aarch64" } def get_vm(name: str = "nondisk-boot") -> str: