Skip to content

Commit 089a69e

Browse files
haitaohuangCopilot
authored andcommitted
ci(xtask): cover vmcall-raw migtd lib tests
Add a third `cargo test --lib` invocation for migtd under `--no-default-features --features main,policy_v2,vmcall-raw` so the rebinding module and the vmcall-raw layout of MigtdMigrationInformation are exercised by the Library Crates workflow. `--lib` is required because the bin's `fn main` collides with the cfg(test) stub under `main + !AzCVMEmu` (pre-existing, out of scope). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
1 parent 9923b94 commit 089a69e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

xtask/src/library.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ impl LibraryCrates {
4545
cmd!(sh, "cargo test")
4646
.args(["-p", name.as_str(), "--features", "policy_v2"])
4747
.run()?;
48+
// Cover the vmcall-raw transport layout (incompatible with the
49+
// default virtio-vsock feature) so the rebinding module and the
50+
// vmcall-raw variant of MigtdMigrationInformation are exercised.
51+
// Restricted to --lib because the bin target's `main` symbol
52+
// conflicts under `cfg(test) + main + !AzCVMEmu`.
53+
cmd!(sh, "cargo test")
54+
.args([
55+
"--lib",
56+
"-p",
57+
name.as_str(),
58+
"--no-default-features",
59+
"--features",
60+
"main,policy_v2,vmcall-raw",
61+
])
62+
.run()?;
4863
} else if name.as_str() == "policy" {
4964
// Run tests for policy V1 and V2
5065
cmd!(sh, "cargo test").args(["-p", name.as_str()]).run()?;

0 commit comments

Comments
 (0)