| OLD | NEW |
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
| 2 # | 2 # |
| 3 # Copyright 2009 The Chromium Authors. All rights reserved. | 3 # Copyright 2009 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 | 7 |
| 8 """A tool to run a chrome sync integration test, used by the buildbot slaves. | 8 """A tool to run a chrome sync integration test, used by the buildbot slaves. |
| 9 | 9 |
| 10 When this is run, the current directory (cwd) should be the outer build | 10 When this is run, the current directory (cwd) should be the outer build |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 return 1 | 278 return 1 |
| 279 logging.info('Verified that sync server is running on port: %s', sync_port) | 279 logging.info('Verified that sync server is running on port: %s', sync_port) |
| 280 user_dir = GenericSetup(test_name) | 280 user_dir = GenericSetup(test_name) |
| 281 logging.info('Created user data dir %s' % (user_dir)) | 281 logging.info('Created user data dir %s' % (user_dir)) |
| 282 command = [ | 282 command = [ |
| 283 test_exe_path, | 283 test_exe_path, |
| 284 '--gtest_filter='+ test_name, | 284 '--gtest_filter='+ test_name, |
| 285 '--user-data-dir=' + user_dir, | 285 '--user-data-dir=' + user_dir, |
| 286 '--sync-user-for-test=' + username, | 286 '--sync-user-for-test=' + username, |
| 287 '--sync-password-for-test=' + password, | 287 '--sync-password-for-test=' + password, |
| 288 '--sync-url=' + HTTP_SERVER_URL, | 288 '--sync-url=' + HTTP_SERVER_URL + ':' + sync_port] |
| 289 '--sync-port=' + sync_port] | |
| 290 logging.info( | 289 logging.info( |
| 291 '%s will run with command: %s' | 290 '%s will run with command: %s' |
| 292 % (test_name, subprocess.list2cmdline(command))) | 291 % (test_name, subprocess.list2cmdline(command))) |
| 293 result = RunCommand(command) | 292 result = RunCommand(command) |
| 294 StopSyncServer(sync_port) | 293 StopSyncServer(sync_port) |
| 295 return result | 294 return result |
| 296 finally: | 295 finally: |
| 297 logging.info('%s End' % (test_name)) | 296 logging.info('%s End' % (test_name)) |
| 298 | 297 |
| 299 | 298 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 sys.stderr.write('Missing required parameter, please fix it.\n') | 375 sys.stderr.write('Missing required parameter, please fix it.\n') |
| 377 option_parser.print_help() | 376 option_parser.print_help() |
| 378 sys.exit(1) | 377 sys.exit(1) |
| 379 if sys.platform == 'win32': | 378 if sys.platform == 'win32': |
| 380 HTTP_SERVER_URL = options.http_server_url | 379 HTTP_SERVER_URL = options.http_server_url |
| 381 HTTP_SERVER_PORT = options.http_server_port | 380 HTTP_SERVER_PORT = options.http_server_port |
| 382 sys.exit(main_win(options, args)) | 381 sys.exit(main_win(options, args)) |
| 383 else: | 382 else: |
| 384 sys.stderr.write('Unknown sys.platform value %s\n' % repr(sys.platform)) | 383 sys.stderr.write('Unknown sys.platform value %s\n' % repr(sys.platform)) |
| 385 sys.exit(1) | 384 sys.exit(1) |
| OLD | NEW |