summaryrefslogtreecommitdiffstats
path: root/chrome/test/live_sync
diff options
context:
space:
mode:
authortejasshah@google.com <tejasshah@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:28:19 +0000
committertejasshah@google.com <tejasshah@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:28:19 +0000
commit7aa58f2b4d950ef8c77a2b80184e5ff29dea476c (patch)
tree11816ba114be5f693fd0a16292b8c797018b283f /chrome/test/live_sync
parent28a7f6f152f35ac2a059e6bffec42fe9fbd6ab07 (diff)
downloadchromium_src-7aa58f2b4d950ef8c77a2b80184e5ff29dea476c.zip
chromium_src-7aa58f2b4d950ef8c77a2b80184e5ff29dea476c.tar.gz
chromium_src-7aa58f2b4d950ef8c77a2b80184e5ff29dea476c.tar.bz2
With this change script can look out for password file if password was not supplied as a parameter. This change is required for buildbot slave security, as buildbot will call this script without password and can't store password for calling.
Review URL: http://codereview.chromium.org/173500 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/live_sync')
-rw-r--r--chrome/test/live_sync/sync_integration_test.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/test/live_sync/sync_integration_test.py b/chrome/test/live_sync/sync_integration_test.py
index 913c473..5d15fc4 100644
--- a/chrome/test/live_sync/sync_integration_test.py
+++ b/chrome/test/live_sync/sync_integration_test.py
@@ -369,9 +369,19 @@ if '__main__' == __name__:
option_parser.add_option(
'', '--sync-test-password', help='Password for the test account')
options, args = option_parser.parse_args()
+ if not options.sync_test_password:
+ if os.path.exists('sync_password'):
+ fs = open('sync_password', 'r')
+ lines = fs.readlines()
+ if len(lines)==1:
+ options.sync_test_password = lines[0].strip()
+ else:
+ sys.stderr.write('sync_password file is not in required format.\n')
+ else:
+ sys.stderr.write(
+ 'Missing required parameter- sync_test_password, please fix it.\n')
if (not options.build_dir or not options.http_server_url or
- not options.http_server_port or not options.sync_test_username or
- not options.sync_test_password):
+ not options.http_server_port or not options.sync_test_username):
sys.stderr.write('Missing required parameter, please fix it.\n')
option_parser.print_help()
sys.exit(1)