Index: cros_run_vm_test |
diff --git a/cros_run_vm_test b/cros_run_vm_test |
index 22ec17e0ebab98c117866ad88565b039059d7fc6..03c529ee1855bf55aa9d079e29a83c183488be00 100755 |
--- a/cros_run_vm_test |
+++ b/cros_run_vm_test |
@@ -6,13 +6,11 @@ |
# |
# Runs a given test case under a VM. |
-. $(dirname "$(readlink -f "$0")")/outside_chroot_common.sh 2> /dev/null || |
- SCRIPT_ROOT=/usr/lib/crosutils |
-. "${SCRIPT_ROOT}/common.sh" || |
- (echo "Unable to load common.sh" && false) || |
- exit 1 |
+# This can only run outside the chroot. |
+. $(dirname "$(readlink -f "$0")")/outside_chroot_common.sh || exit 1 |
+. "${SCRIPT_ROOT}/common.sh" || exit 1 |
. "${SCRIPT_ROOT}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh" |
-. "${SCRIPT_ROOT}/lib/cros_vm_constants.sh" || \ |
+. "${SCRIPT_ROOT}/lib/cros_vm_constants.sh" || |
die "Unable to load cros_vm_constants.sh" |
get_default_board |
@@ -24,8 +22,6 @@ DEFINE_string results_dir_root "" "alternate root results directory" |
DEFINE_string test_case "" "Name of the test case to run" |
DEFINE_boolean use_emerged ${FLAGS_FALSE} \ |
"Force use of emerged autotest packages" |
-DEFINE_string verify_chrome_version "" \ |
- "Verify that this chrome version matches that on vm." |
set -e |
@@ -40,7 +36,7 @@ FLAGS "$@" || exit 1 |
# Use latest if not specified. |
if [ -z "${FLAGS_image_path}" ]; then |
- LATEST_IMAGE="$(${SCRIPTS_DIR}/get_latest_image.sh \ |
+ LATEST_IMAGE="$("${SCRIPT_ROOT}/get_latest_image.sh" \ |
--board=${FLAGS_board})/${DEFAULT_QEMU_IMAGE}" |
info "Using latest vm image ${LATEST_IMAGE}" |
FLAGS_image_path=${LATEST_IMAGE} |
@@ -72,20 +68,7 @@ trap stop_kvm EXIT |
start_kvm "${FLAGS_image_path}" |
retry_until_ssh |
-if [ -n "${FLAGS_verify_chrome_version}" ]; then |
- info "Verifying version of Chrome matches what we expect." |
- if chrome_version_is_valid "${FLAGS_verify_chrome_version}"; then |
- chrome_version_on_vm=$("${SCRIPTS_DIR}/bin/cros_get_chrome_version" \ |
- --remote=127.0.0.1 \ |
- --ssh_port=${FLAGS_ssh_port}) |
- [[ ${chrome_version_on_vm} == ${FLAGS_verify_chrome_version} ]] || \ |
- warn "CHROME_VERSION is no longer set.This check will be removed" |
- else |
- warn "${FLAGS_verify_chrome_version} is not a valid Chrome version" |
- fi |
-fi |
- |
-"${SCRIPTS_DIR}/run_remote_tests.sh" \ |
+"${SCRIPT_ROOT}/enter_chroot.sh" -- run_remote_tests.sh \ |
--board=${FLAGS_board} \ |
--ssh_port=${FLAGS_ssh_port} \ |
--remote=127.0.0.1 \ |