Skip to content

Commit

Permalink
[antlir2][vm] make test non-optional for test rules
Browse files Browse the repository at this point in the history
Summary: Accidentally find this. It totally won't work if test is None...

Test Plan: CI

Reviewed By: vmagro

Differential Revision: D50390507

fbshipit-source-id: 54dd76314a1a8c56a28693643254408d1ed545a3
  • Loading branch information
wujj123456 authored and facebook-github-bot committed Oct 18, 2023
1 parent 88887fc commit 537e5a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion antlir/antlir2/antlir2_vm/bzl/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ _vm_host = rule(
"serial_index": attrs.int(default = 0, doc = "index of the serial port"),
"use_tpm": attrs.bool(default = False, doc = "enable software TPM"),
} | {
# Non-hardware parameters for the VM
"append": attrs.option(
attrs.string(),
default = None,
doc = "additional kernel command line parameter",
),
# Non-hardware parameters for the VM
"initrd": attrs.option(
attrs.source(),
default = None,
Expand Down
9 changes: 3 additions & 6 deletions antlir/antlir2/antlir2_vm/bzl/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@ def _impl(ctx: AnalysisContext) -> list[Provider]:
_vm_test = rule(
impl = _impl,
attrs = {
"test": attrs.option(
attrs.dep(
providers = [ExternalRunnerTestInfo],
doc = "Test target to execute inside VM",
),
default = None,
"test": attrs.dep(
providers = [ExternalRunnerTestInfo],
doc = "Test target to execute inside VM",
),
"test_labels": attrs.option(
attrs.list(attrs.string(), default = []),
Expand Down

0 comments on commit 537e5a2

Please sign in to comment.