Skip to content

Commit 334034b

Browse files
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 #397
1 parent 2844693 commit 334034b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Diff for: xtask/src/main.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,26 @@ fn run_vm_tests(opt: &QemuOpt) -> Result<()> {
108108
/// with VM tests, but a few things like macros and data types can be
109109
/// tested with regular tests.
110110
fn run_host_tests() -> Result<()> {
111+
// Run xtask tests.
112+
let cargo = Cargo {
113+
action: CargoAction::Test,
114+
features: Vec::new(),
115+
toolchain: None,
116+
packages: vec![Package::Xtask],
117+
release: false,
118+
target: None,
119+
warnings_as_errors: false,
120+
};
121+
run_cmd(cargo.command()?)?;
122+
123+
// Run uefi-rs and uefi-macros tests.
111124
let cargo = Cargo {
112125
action: CargoAction::Test,
113126
features: vec![Feature::Exts],
114127
toolchain: Some(NIGHTLY.into()),
115128
// Don't test uefi-services (or the packages that depend on it)
116129
// as it has lang items that conflict with `std`.
117-
packages: vec![Package::Uefi, Package::UefiMacros, Package::Xtask],
130+
packages: vec![Package::Uefi, Package::UefiMacros],
118131
release: false,
119132
// Use the host target so that tests can run without a VM.
120133
target: None,

0 commit comments

Comments
 (0)