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

Side by Side Diff: tools/testing/dart/drt_updater.dart

Issue 10264005: Suppress get_drt/dartium download if an executable is provided via flag (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #library("drt_updater"); 5 #library("drt_updater");
6 6
7 #import("dart:io"); 7 #import("dart:io");
8 #import("dart:builtin"); 8 #import("dart:builtin");
9 9
10 class _DartiumUpdater { 10 class _DartiumUpdater {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void _onUpdatedHandler(int exit_code) { 47 void _onUpdatedHandler(int exit_code) {
48 print('$name updated ($exit_code)'); 48 print('$name updated ($exit_code)');
49 for (var callback in onUpdated ) callback(); 49 for (var callback in onUpdated ) callback();
50 } 50 }
51 } 51 }
52 52
53 _DartiumUpdater _dumpRenderTreeUpdater; 53 _DartiumUpdater _dumpRenderTreeUpdater;
54 _DartiumUpdater _dartiumUpdater; 54 _DartiumUpdater _dartiumUpdater;
55 55
56 _DartiumUpdater runtimeUpdater(String runtime) { 56 _DartiumUpdater runtimeUpdater(Map configuration) {
57 if (runtime == 'drt') { 57 String runtime = configuration['runtime'];
58 if (!configuration.containsKey(runtime) || configuration[runtime] != '') {
Bill Hesse 2012/04/30 13:46:10 This seems totally wrong. I think configuration['
vsm 2012/04/30 14:00:33 I'm checking what you suggest. It's runtime the v
Bill Hesse 2012/05/01 08:03:33 Oh, I see. That is really tricky, and easy to ove
59 // Either the runtime executable does not require updating or an
60 // explicit path is provided via --drt or --dartium.
61 return null;
62 } else if (runtime == 'drt') {
58 if (_dumpRenderTreeUpdater === null) { 63 if (_dumpRenderTreeUpdater === null) {
59 _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree', 64 _dumpRenderTreeUpdater = new _DartiumUpdater('DumpRenderTree',
60 'get_drt.py'); 65 'get_drt.py');
61 } 66 }
62 return _dumpRenderTreeUpdater; 67 return _dumpRenderTreeUpdater;
63 } else if (runtime == 'dartium') { 68 } else if (runtime == 'dartium') {
64 if (_dartiumUpdater === null) { 69 if (_dartiumUpdater === null) {
65 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_drt.py', 70 _dartiumUpdater = new _DartiumUpdater('Dartium Chrome', 'get_drt.py',
66 '--dartium'); 71 '--dartium');
67 } 72 }
68 return _dartiumUpdater; 73 return _dartiumUpdater;
69 } else { 74 } else {
70 return null; 75 return null;
71 } 76 }
72 } 77 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698