mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 13:23:08 +00:00
9c9fbdc24c
This allowes fixture to read these settings from env and thus allow scripts to pass in desired testing configs without requiring a custom-built rust test harness. Test command below run in dev container with strace package installed can produce debug level logs and separate per-process strace results in designated files. TEST=CROSVM_CARGO_TEST_E2E_WRAPPER_CMD="strace -ff --output=/workspace/stracetest" CROSVM_CARGO_TEST_LOG_LEVEL_DEBUG=1 CROSVM_CARGO_TEST_LOG_FILE=/workspace/logtest.log ./tools/bench boot BUG=b:258316090 Change-Id: I5b0eb373802722075242e33027585d702da77e59 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4297485 Auto-Submit: Zihan Chen <zihanchen@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
13 lines
378 B
Rust
13 lines
378 B
Rust
// Copyright 2023 The ChromiumOS Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
use fixture::vm::Config;
|
|
use fixture::vm::TestVm;
|
|
|
|
#[test]
|
|
fn boot_test_vm() -> anyhow::Result<()> {
|
|
let mut vm = TestVm::new(Config::from_env()).unwrap();
|
|
assert_eq!(vm.exec_in_guest("echo 42")?.trim(), "42");
|
|
Ok(())
|
|
}
|