tests: Move test_infra from a module to crate

It must be specified as excluded from the workspace as it must not be
built on non-test targets due to issues with the ssh2 dependency and the
musl toolchain.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-03-23 16:15:48 +00:00
committed by Sebastien Boeuf
parent 91145afa9b
commit 88c30764e0
5 changed files with 30 additions and 4 deletions

View File

@@ -10,12 +10,11 @@ extern crate lazy_static;
#[cfg(test)]
#[cfg(feature = "integration_tests")]
mod test_infra;
extern crate test_infra;
#[cfg(test)]
#[cfg(feature = "integration_tests")]
mod tests {
use crate::test_infra::*;
use net_util::MacAddr;
use std::collections::HashMap;
use std::env;
@@ -31,6 +30,7 @@ mod tests {
use std::sync::mpsc::Receiver;
use std::sync::{mpsc, Mutex};
use std::thread;
use test_infra::*;
use vmm_sys_util::{tempdir::TempDir, tempfile::TempFile};
#[cfg_attr(target_arch = "aarch64", allow(unused_imports))]
use wait_timeout::ChildExt;