Skip to content

Commit

Permalink
xtask: run xtask tests separately from uefi tests
Browse files Browse the repository at this point in the history
The xtask tests don't need to use the nightly toolchain or have any
features set.

Partially fixes #397
  • Loading branch information
nicholasbishop committed Apr 1, 2022
1 parent 2844693 commit 334034b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 334034b

Please sign in to comment.