| 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 |
| 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 // TODO(antonm): rename to something like test_runner_updater. | 5 // TODO(antonm): rename to something like test_runner_updater. |
| 6 | 6 |
| 7 library drt_updater; | 7 library drt_updater; |
| 8 | 8 |
| 9 import "dart:async"; | 9 import "dart:async"; |
| 10 import "dart:io"; | 10 import "dart:io"; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 _updatingProcess.then(_onUpdatedHandler).catchError((e) { | 33 _updatingProcess.then(_onUpdatedHandler).catchError((e) { |
| 34 print("Error starting $script process: $e"); | 34 print("Error starting $script process: $e"); |
| 35 // TODO(floitsch): should we print the stacktrace? | 35 // TODO(floitsch): should we print the stacktrace? |
| 36 return false; | 36 return false; |
| 37 }); | 37 }); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 List<String> get _getUpdateCommand { | 41 List<String> get _getUpdateCommand { |
| 42 Uri updateScript = TestUtils.dartDirUri.resolve(script); | 42 Uri updateScript = TestUtils.dartDirUri.resolve(script); |
| 43 List<String> command = [updateScriptPath.toFilePath()]; | 43 List<String> command = [updateScript.toFilePath()]; |
| 44 if (null != option) { | 44 if (null != option) { |
| 45 command.add(option); | 45 command.add(option); |
| 46 } | 46 } |
| 47 return command; | 47 return command; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void _onUpdatedHandler(ProcessResult result) { | 50 void _onUpdatedHandler(ProcessResult result) { |
| 51 if (result.exitCode == 0) { | 51 if (result.exitCode == 0) { |
| 52 print('$name updated'); | 52 print('$name updated'); |
| 53 } else { | 53 } else { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 79 if (_dartiumUpdater == null) { | 79 if (_dartiumUpdater == null) { |
| 80 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', | 80 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', |
| 81 'tools/get_archive.py', | 81 'tools/get_archive.py', |
| 82 'dartium'); | 82 'dartium'); |
| 83 } | 83 } |
| 84 return _dartiumUpdater; | 84 return _dartiumUpdater; |
| 85 } else { | 85 } else { |
| 86 return null; | 86 return null; |
| 87 } | 87 } |
| 88 } | 88 } |
| OLD | NEW |