| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 package com.google.dart.compiler; | 5 package com.google.dart.compiler; |
| 6 | 6 |
| 7 |
| 8 import com.google.dart.runner.DartRunner; |
| 9 |
| 7 import java.io.BufferedReader; | 10 import java.io.BufferedReader; |
| 8 import java.io.InputStreamReader; | 11 import java.io.InputStreamReader; |
| 9 | 12 |
| 10 /** | 13 /** |
| 11 * Provides a framework to read command line options from stdin and feed them to | 14 * Provides a framework to read command line options from stdin and feed them to |
| 12 * either the DartCompiler or TestRunner. | 15 * either the {@link DartCompiler} or {@link DartRunner}. |
| 13 * | 16 * |
| 14 */ | 17 */ |
| 15 public class UnitTestBatchRunner { | 18 public class UnitTestBatchRunner { |
| 16 | 19 |
| 17 public interface Invocation { | 20 public interface Invocation { |
| 18 public boolean invoke (String[] args) throws Throwable; | 21 public boolean invoke (String[] args) throws Throwable; |
| 19 } | 22 } |
| 20 | 23 |
| 21 /** | 24 /** |
| 22 * Run the tool in 'batch' mode, receiving command lines through stdin and ret
urning | 25 * Run the tool in 'batch' mode, receiving command lines through stdin and ret
urning |
| (...skipping 29 matching lines...) Expand all Loading... |
| 52 System.out.println(">>> TEST CRASH"); | 55 System.out.println(">>> TEST CRASH"); |
| 53 System.out.flush(); | 56 System.out.flush(); |
| 54 throw e; | 57 throw e; |
| 55 } | 58 } |
| 56 long elapsed = System.currentTimeMillis() - startTime; | 59 long elapsed = System.currentTimeMillis() - startTime; |
| 57 System.out.println(">>> BATCH END (" + (totalTests - testsFailed) + "/" | 60 System.out.println(">>> BATCH END (" + (totalTests - testsFailed) + "/" |
| 58 + totalTests + ") " + elapsed + "ms"); | 61 + totalTests + ") " + elapsed + "ms"); |
| 59 System.out.flush(); | 62 System.out.flush(); |
| 60 } | 63 } |
| 61 } | 64 } |
| OLD | NEW |