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

Unified Diff: bin/cros_run_vm_update

Issue 5373008: Add testPartialUpdate, testCorruptedUpdate. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Code review changes and fixes for VMs. Created 10 years 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
« bin/cros_au_test_harness.py ('K') | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_run_vm_update
diff --git a/bin/cros_run_vm_update b/bin/cros_run_vm_update
index 0af8fb3a3e2331172ab98b4e63fd672f561af15c..abd00714622e61a6c076927e6c71fb8712e0499d 100755
--- a/bin/cros_run_vm_update
+++ b/bin/cros_run_vm_update
@@ -9,6 +9,7 @@
. "$(dirname $0)/../common.sh"
. "$(dirname $0)/../lib/cros_vm_lib.sh"
+DEFINE_string payload "" "Full name of the payload to update with."
DEFINE_string src_image "" \
"Create a delta update by passing in the image on the remote machine."
DEFINE_string stateful_update_flag "" "Flags to pass to stateful update." s
@@ -21,7 +22,7 @@ set -e
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
-[ -n "${FLAGS_update_image_path}" ] || \
+[ -n "${FLAGS_update_image_path}" ] || [ -n "${FLAGS_payload}" ] || \
die "You must specify a path to an image to use as an update."
[ -n "${FLAGS_vm_image_path}" ] || \
die "You must specify a path to a vm image."
@@ -29,6 +30,14 @@ eval set -- "${FLAGS_ARGV}"
trap stop_kvm EXIT
start_kvm "${FLAGS_vm_image_path}"
+if [ -n "${FLAGS_update_image_path}" ]; then
+ IMAGE_ARGS="--image=$(readlink -f ${FLAGS_update_image_path})"
+fi
+
+if [ -n "${FLAGS_payload}" ]; then
+ IMAGE_ARGS="--payload="${FLAGS_payload}""
+fi
+
$(dirname $0)/../image_to_live.sh \
--remote=127.0.0.1 \
--ssh_port=${FLAGS_ssh_port} \
@@ -36,5 +45,5 @@ $(dirname $0)/../image_to_live.sh \
--src_image="${FLAGS_src_image}" \
--verify \
--for_vm \
- --image=$(readlink -f ${FLAGS_update_image_path})
+ ${IMAGE_ARGS}
« bin/cros_au_test_harness.py ('K') | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698