From 334034b9f5fea3ecff7262a1315cd9aff8673c4f Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 1 Apr 2022 14:31:48 -0700 Subject: [PATCH] xtask: run xtask tests separately from uefi tests The xtask tests don't need to use the nightly toolchain or have any features set. Partially fixes https://github.com/rust-osdev/uefi-rs/issues/397 --- xtask/src/main.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 279386fa1..1e0adc7e8 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -108,13 +108,26 @@ fn run_vm_tests(opt: &QemuOpt) -> Result<()> { /// with VM tests, but a few things like macros and data types can be /// tested with regular tests. fn run_host_tests() -> Result<()> { + // Run xtask tests. + let cargo = Cargo { + action: CargoAction::Test, + features: Vec::new(), + toolchain: None, + packages: vec![Package::Xtask], + release: false, + target: None, + warnings_as_errors: false, + }; + run_cmd(cargo.command()?)?; + + // Run uefi-rs and uefi-macros tests. let cargo = Cargo { action: CargoAction::Test, features: vec![Feature::Exts], toolchain: Some(NIGHTLY.into()), // Don't test uefi-services (or the packages that depend on it) // as it has lang items that conflict with `std`. - packages: vec![Package::Uefi, Package::UefiMacros, Package::Xtask], + packages: vec![Package::Uefi, Package::UefiMacros], release: false, // Use the host target so that tests can run without a VM. target: None,