crosvm/e2e_tests/guest_under_test/run_guest.sh
Takaya Saeki 4131e80c89 e2e_tests: fix small bugs in run_guest.sh
run_guest.sh lacks the shebang, and has a small bug of missing quotes.
This commit fixes them.

BUG=None
TEST=Confirmed that "$@" works as expected by checking the passed
arguments.

Change-Id: Ic0d5e8676b206be15b1b2f09b3b9c6de2b9d2fb3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4537378
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Takaya Saeki <takayas@chromium.org>
2023-05-17 02:56:31 +00:00

17 lines
502 B
Bash
Executable file

#!/bin/bash
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Example invocation to run the locally built guest for debugging
CARGO_TARGET=$(cargo metadata --no-deps --format-version 1 |
jq -r ".target_directory")
GUEST_DIR="${CARGO_TARGET}/guest_under_test/x86_64"
cargo run -p crosvm -- \
run \
-p "init=/bin/sh" \
--root "${GUEST_DIR}/rootfs"\
"${GUEST_DIR}/bzImage" \
"$@"