crosvm/e2e_tests/benches/boot.rs
Zihan Chen 7a62cb0465 e2e_tests: Support program parsing guest command output
Delegate has been restructured to support this change, and sadly
Win64 compile exclusion has to be reintroduced to avoid compiling
this binary on Windows.

Now e2e_tests can explicitly obtain result (including stdout/stderr/
exit code/signal) from command ran in test guests.

BUG=b:257303497

Change-Id: Ibcd773b69cca9708a8dacb34cc870ca527fa32c3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4787727
Auto-Submit: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-09-19 22:27:35 +00:00

14 lines
385 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")?.stdout.trim(), "42");
Ok(())
}