Index: cros_run_vm_test |
diff --git a/cros_run_vm_test b/cros_run_vm_test |
index 22ec17e0ebab98c117866ad88565b039059d7fc6..c34aae8d2055e0d06c8abde5022a9b263ba9eb9b 100755 |
--- a/cros_run_vm_test |
+++ b/cros_run_vm_test |
@@ -6,13 +6,12 @@ |
# |
# 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) || |
+# This can only run inside the chroot. |
+. "/usr/lib/crosutils/common.sh" 2> /dev/null || |
sosa
2011/03/25 04:43:47
run_remote_tests can't run outside and we now have
|
+ (echo "Must run within chroot" && false) || |
exit 1 |
-. "${SCRIPT_ROOT}/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh" |
-. "${SCRIPT_ROOT}/lib/cros_vm_constants.sh" || \ |
+. "/usr/lib/crosutils/lib/cros_vm_lib.sh" || die "Unable to load cros_vm_lib.sh" |
+. "/usr/lib/crosutils/lib/cros_vm_constants.sh" || \ |
die "Unable to load cros_vm_constants.sh" |
get_default_board |
@@ -24,8 +23,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 +37,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="$(/usr/lib/crosutils/get_latest_image.sh \ |
--board=${FLAGS_board})/${DEFAULT_QEMU_IMAGE}" |
info "Using latest vm image ${LATEST_IMAGE}" |
FLAGS_image_path=${LATEST_IMAGE} |
@@ -72,20 +69,7 @@ trap stop_kvm EXIT |
start_kvm "${FLAGS_image_path}" |
retry_until_ssh |
-if [ -n "${FLAGS_verify_chrome_version}" ]; then |
sosa
2011/03/25 04:43:47
No one uses this flag anymore.
|
- 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" \ |
+run_remote_tests.sh \ |
--board=${FLAGS_board} \ |
--ssh_port=${FLAGS_ssh_port} \ |
--remote=127.0.0.1 \ |