Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: cros_run_vm_test

Issue 6736023: Install test scripts into chroot. (Closed) Base URL: http://git.chromium.org/git/crostestutils.git@master
Patch Set: Fix path for chroot Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ||
petkov 2011/03/30 14:32:16 msb changed this in a few places to just source co
sosa 2011/03/30 18:35:50 Done.
+ (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"
petkov 2011/03/30 14:32:16 it might be worth defining CROSUTILS and using it
sosa 2011/03/30 18:35:50 Done.
+. "/usr/lib/crosutils/lib/cros_vm_constants.sh" || \
petkov 2011/03/30 14:32:16 no need for trailing \
sosa 2011/03/30 18:35:50 Done.
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/30 01:09:42 No one uses this
- 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 \
petkov 2011/03/30 14:32:16 you're relying on crosutils to be on the path? why
sosa 2011/03/30 18:35:50 All scripts (non-symlinks) in src/scripts are inst
--board=${FLAGS_board} \
--ssh_port=${FLAGS_ssh_port} \
--remote=127.0.0.1 \

Powered by Google App Engine
This is Rietveld 408576698