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

Unified Diff: image_to_live.sh

Issue 5632002: Create a transparent proxy for test programs to use, with the (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Readd comment lost in rebase. 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
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | lib/cros_test_proxy.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: image_to_live.sh
diff --git a/image_to_live.sh b/image_to_live.sh
index 3988470254d4c7a634cae6ce25b8f48ec9311c46..545e428b9281854cb9bac41e154cf2a100a0a3da 100755
--- a/image_to_live.sh
+++ b/image_to_live.sh
@@ -38,6 +38,8 @@ DEFINE_string image "" \
"Update with this image path that is in this source checkout." i
DEFINE_string payload "" \
"Update with this update payload, ignoring specified images."
+DEFINE_string proxy_port "" \
+ "Have the client request from this proxy instead of devserver."
DEFINE_string src_image "" \
"Create a delta update by passing in the image on the remote machine."
DEFINE_boolean update_stateful ${FLAGS_TRUE} \
@@ -139,6 +141,11 @@ function start_dev_server {
--payload $(reinterpret_path_for_chroot ${FLAGS_payload})"
fi
+ if [ -n "${FLAGS_proxy_port}" ]; then
+ devserver_flags="${devserver_flags} \
+ --proxy_port ${FLAGS_proxy_port}"
+ fi
+
[ ${FLAGS_for_vm} -eq ${FLAGS_TRUE} ] && \
devserver_flags="${devserver_flags} --for_vm"
@@ -209,9 +216,15 @@ function get_update_args {
function get_devserver_url {
local devserver_url=""
+ local port=${FLAGS_devserver_port}
+
+ if [[ -n ${FLAGS_proxy_port} ]]; then
+ port=${FLAGS_proxy_port}
+ fi
+
if [ ${FLAGS_ignore_hostname} -eq ${FLAGS_TRUE} ]; then
if [ -z ${FLAGS_update_url} ]; then
- devserver_url="http://$(get_hostname):${FLAGS_devserver_port}/update"
+ devserver_url="http://$(get_hostname):${port}/update"
else
devserver_url="${FLAGS_update_url}"
fi
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | lib/cros_test_proxy.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698