mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 10:10:41 +00:00
integration_tests: Don't run fixture.rs as a test
Each file in the "tests" dir is interpreted as a test, so cargo was running fixture.rs as a test with 0 test cases. Moved it into a submodule as recommened in https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-tests TEST=./integration_tests/run Change-Id: I7cbb9a2e5e1283829e20d531a90f9d0c1fffd232 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3795890 Auto-Submit: Frederick Mayle <fmayle@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com> Tested-by: Frederick Mayle <fmayle@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
950b4839a8
commit
528777ab32
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,7 @@ const ARCH: &str = "aarch64";
|
||||||
const VM_COMMUNICATION_TIMEOUT: Duration = Duration::from_secs(10);
|
const VM_COMMUNICATION_TIMEOUT: Duration = Duration::from_secs(10);
|
||||||
|
|
||||||
fn prebuilt_version() -> &'static str {
|
fn prebuilt_version() -> &'static str {
|
||||||
include_str!("../guest_under_test/PREBUILT_VERSION").trim()
|
include_str!("../../guest_under_test/PREBUILT_VERSION").trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn kernel_prebuilt_url() -> String {
|
fn kernel_prebuilt_url() -> String {
|
||||||
|
@ -170,6 +170,7 @@ pub struct Config {
|
||||||
o_direct: bool,
|
o_direct: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
impl Config {
|
impl Config {
|
||||||
/// Creates a new `run` command with `extra_args`.
|
/// Creates a new `run` command with `extra_args`.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
|
@ -194,6 +195,7 @@ impl Config {
|
||||||
///
|
///
|
||||||
/// After creation, commands can be sent via exec_in_guest. The VM is stopped
|
/// After creation, commands can be sent via exec_in_guest. The VM is stopped
|
||||||
/// when this instance is dropped.
|
/// when this instance is dropped.
|
||||||
|
#[cfg(test)]
|
||||||
pub struct TestVm {
|
pub struct TestVm {
|
||||||
/// Maintain ownership of test_dir until the vm is destroyed.
|
/// Maintain ownership of test_dir until the vm is destroyed.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
Loading…
Reference in a new issue