| 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 import "package:expect/expect.dart"; |  | 
| 6 import "dart:io"; | 5 import "dart:io"; | 
| 7 | 6 | 
| 8 void runTests(String executable, String script, Iterator iterator) { | 7 void runTests(String executable, String script, Iterator iterator) { | 
| 9   if (iterator.moveNext()) { | 8   if (iterator.moveNext()) { | 
| 10     var progressIndicator = iterator.current; | 9     var progressIndicator = iterator.current; | 
| 11     Process.run(executable, [script, progressIndicator]).then((result) { | 10     Process.run(executable, [script, progressIndicator]).then((result) { | 
| 12       Expect.equals(1, result.exitCode); | 11       Expect.equals(1, result.exitCode); | 
| 13       if (progressIndicator == 'buildbot') { | 12       if (progressIndicator == 'buildbot') { | 
| 14         Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@")); | 13         Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@")); | 
| 15       } | 14       } | 
| 16       runTests(executable, script, iterator); | 15       runTests(executable, script, iterator); | 
| 17     }); | 16     }); | 
| 18   } | 17   } | 
| 19 } | 18 } | 
| 20 | 19 | 
| 21 main() { | 20 main() { | 
| 22   var scriptPath = new Path(new Options().script); | 21   var scriptPath = new Path(new Options().script); | 
| 23   var scriptDirPath = scriptPath.directoryPath; | 22   var scriptDirPath = scriptPath.directoryPath; | 
| 24   var exitCodeScriptPath = | 23   var exitCodeScriptPath = | 
| 25     scriptDirPath.append('test_runner_exit_code_script.dart'); | 24     scriptDirPath.append('test_runner_exit_code_script.dart'); | 
| 26   var script = exitCodeScriptPath.toNativePath(); | 25   var script = exitCodeScriptPath.toNativePath(); | 
| 27   var executable = new Options().executable; | 26   var executable = new Options().executable; | 
| 28   var progressTypes = ['compact', 'color', 'line', 'verbose', | 27   var progressTypes = ['compact', 'color', 'line', 'verbose', | 
| 29                        'status', 'buildbot']; | 28                        'status', 'buildbot']; | 
| 30   var iterator = progressTypes.iterator; | 29   var iterator = progressTypes.iterator; | 
| 31   runTests(executable, script, iterator); | 30   runTests(executable, script, iterator); | 
| 32 } | 31 } | 
| OLD | NEW | 
|---|