Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
|
ricow1
2013/05/27 16:51:59
we should rename this file
Anton Muhin
2013/05/28 16:07:58
Yes, as many options. let me add a todo for now.
| |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library drt_updater; | 5 library drt_updater; |
| 6 | 6 |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 | 9 |
| 10 import "test_suite.dart"; | 10 import "test_suite.dart"; |
| 11 | 11 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 print('Failure updating $name'); | 53 print('Failure updating $name'); |
| 54 print(' Exit code: ${result.exitCode}'); | 54 print(' Exit code: ${result.exitCode}'); |
| 55 print(result.stdout); | 55 print(result.stdout); |
| 56 print(result.stderr); | 56 print(result.stderr); |
| 57 exit(1); | 57 exit(1); |
| 58 } | 58 } |
| 59 for (var callback in onUpdated ) callback(); | 59 for (var callback in onUpdated ) callback(); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 _DartiumUpdater _dumpRenderTreeUpdater; | 63 _DartiumUpdater _contentShellUpdater; |
| 64 _DartiumUpdater _dartiumUpdater; | 64 _DartiumUpdater _dartiumUpdater; |
| 65 | 65 |
| 66 _DartiumUpdater runtimeUpdater(Map configuration) { | 66 _DartiumUpdater runtimeUpdater(Map configuration) { |
| 67 String runtime = configuration['runtime']; | 67 String runtime = configuration['runtime']; |
| 68 if (runtime == 'drt' && configuration['drt'] == '') { | 68 if (runtime == 'drt' && configuration['drt'] == '') { |
| 69 // Download the default DumpRenderTree from Google Storage. | 69 // Download the default content shell from Google Storage. |
| 70 if (_dumpRenderTreeUpdater == null) { | 70 if (_contentShellUpdater == null) { |
| 71 _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree', | 71 _contentShellUpdater = new _DartiumUpdater('Content Shell', |
| 72 'get_archive.py', 'drt'); | 72 'get_archive.py', 'drt'); |
| 73 } | 73 } |
| 74 return _dumpRenderTreeUpdater; | 74 return _contentShellUpdater; |
| 75 } else if (runtime == 'dartium' && configuration['dartium'] == '') { | 75 } else if (runtime == 'dartium' && configuration['dartium'] == '') { |
| 76 // Download the default Dartium from Google Storage. | 76 // Download the default Dartium from Google Storage. |
| 77 if (_dartiumUpdater == null) { | 77 if (_dartiumUpdater == null) { |
| 78 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_archive.py', | 78 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_archive.py', |
| 79 'dartium'); | 79 'dartium'); |
| 80 } | 80 } |
| 81 return _dartiumUpdater; | 81 return _dartiumUpdater; |
| 82 } else { | 82 } else { |
| 83 return null; | 83 return null; |
| 84 } | 84 } |
| 85 } | 85 } |
| OLD | NEW |