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

Side by Side Diff: utils/testrunner/utils.dart

Issue 46673003: Remove uses of Options from utils directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « utils/testrunner/testrunner.dart ('k') | utils/tests/string_encoding/benchmark_runner.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 part of testrunner; 5 part of testrunner;
6 6
7 /** Create a file [fileName] and populate it with [contents]. */ 7 /** Create a file [fileName] and populate it with [contents]. */
8 void writeFile(String fileName, String contents) { 8 void writeFile(String fileName, String contents) {
9 var file = new File(fileName); 9 var file = new File(fileName);
10 file.writeAsStringSync(contents); 10 file.writeAsStringSync(contents);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 return files; 87 return files;
88 } 88 }
89 89
90 /** 90 /**
91 * Get the directory that testrunner lives in; we need it to import 91 * Get the directory that testrunner lives in; we need it to import
92 * support files into the generated scripts. 92 * support files into the generated scripts.
93 */ 93 */
94 94
95 String get runnerDirectory { 95 String get runnerDirectory {
96 var libDirectory = makePathAbsolute(new Options().script); 96 var libDirectory = makePathAbsolute(new Platform.script);
97 return libDirectory.substring(0, 97 return libDirectory.substring(0,
98 libDirectory.lastIndexOf(Platform.pathSeparator)); 98 libDirectory.lastIndexOf(Platform.pathSeparator));
99 } 99 }
100 100
101 /* 101 /*
102 * Run an external process [cmd] with command line arguments [args]. 102 * Run an external process [cmd] with command line arguments [args].
103 * Returns a [Future] for when the process terminates. 103 * Returns a [Future] for when the process terminates.
104 */ 104 */
105 Future _processHelper(String command, List<String> args, 105 Future _processHelper(String command, List<String> args,
106 {String workingDir}) { 106 {String workingDir}) {
107 var options = null; 107 var options = null;
108 if (workingDir != null) { 108 if (workingDir != null) {
109 options = new ProcessOptions(); 109 options = new ProcessOptions();
110 options.workingDirectory = workingDir; 110 options.workingDirectory = workingDir;
111 } 111 }
112 return Process.run(command, args, options) 112 return Process.run(command, args, options)
113 .then((result) => result.exitCode) 113 .then((result) => result.exitCode)
114 .catchError((e) { 114 .catchError((e) {
115 print("$command ${args.join(' ')}: ${e.toString()}"); 115 print("$command ${args.join(' ')}: ${e.toString()}");
116 }); 116 });
117 } 117 }
118 118
OLDNEW
« no previous file with comments | « utils/testrunner/testrunner.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698