diff --git a/xtask/src/opt.rs b/xtask/src/opt.rs index 5b7e8c0ae..4567d42bd 100644 --- a/xtask/src/opt.rs +++ b/xtask/src/opt.rs @@ -101,6 +101,10 @@ pub struct QemuOpt { #[clap(long, action)] pub disable_kvm: bool, + /// Disable network tests. + #[clap(long, action)] + pub disable_network: bool, + /// Disable some tests that don't work in the CI. #[clap(long, action)] pub ci: bool, diff --git a/xtask/src/qemu.rs b/xtask/src/qemu.rs index d10ea09c6..b92f0dd3a 100644 --- a/xtask/src/qemu.rs +++ b/xtask/src/qemu.rs @@ -523,7 +523,7 @@ pub fn run_qemu(arch: UefiArch, opt: &QemuOpt) -> Result<()> { // Attach network device with DHCP configured for PXE. Skip this for // examples since it slows down the boot some. - let echo_service = if opt.example.is_none() { + let echo_service = if !opt.disable_network && opt.example.is_none() { cmd.args([ "-nic", "user,model=e1000,net=192.168.17.0/24,tftp=uefi-test-runner/tftp/,bootfile=fake-boot-file",