| 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.corelib; | 5 package com.google.dart.corelib; |
| 6 | 6 |
| 7 import com.google.common.io.CharStreams; | 7 import com.google.common.io.CharStreams; |
| 8 import com.google.common.io.LineReader; | 8 import com.google.common.io.LineReader; |
| 9 import com.google.dart.runner.V8Launcher; | 9 import com.google.dart.runner.V8Launcher; |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 try { | 63 try { |
| 64 Process process = builder.start(); | 64 Process process = builder.start(); |
| 65 InputStream inputStream = process.getInputStream(); | 65 InputStream inputStream = process.getInputStream(); |
| 66 StringBuilder sb = new StringBuilder(); | 66 StringBuilder sb = new StringBuilder(); |
| 67 try { | 67 try { |
| 68 InputStreamReader inputStreamReader = new InputStreamReader(inputStrea
m); | 68 InputStreamReader inputStreamReader = new InputStreamReader(inputStrea
m); |
| 69 LineReader lineReader = new LineReader(inputStreamReader); | 69 LineReader lineReader = new LineReader(inputStreamReader); |
| 70 String line; | 70 String line; |
| 71 while ((line = lineReader.readLine()) != null) { | 71 while ((line = lineReader.readLine()) != null) { |
| 72 if (!line.startsWith("dartc/")) { | 72 if (!line.startsWith("dartc/")) { |
| 73 suite.addTest(SharedTestCase.getInstance(line, false)); | 73 Test result = SharedTestCase.getInstance(line, false); |
| 74 if (result != null) { |
| 75 suite.addTest(result); |
| 76 } |
| 74 } else if (line.startsWith("dartc/client/")) { | 77 } else if (line.startsWith("dartc/client/")) { |
| 75 suite.addTest(SharedTestCase.getInstance(line, true)); | 78 suite.addTest(SharedTestCase.getInstance(line, true)); |
| 76 } | 79 } |
| 77 } | 80 } |
| 78 } finally { | 81 } finally { |
| 79 inputStream.close(); | 82 inputStream.close(); |
| 80 process.getOutputStream().close(); | 83 process.getOutputStream().close(); |
| 81 InputStreamReader inputStreamReader = new InputStreamReader(process.ge
tErrorStream()); | 84 InputStreamReader inputStreamReader = new InputStreamReader(process.ge
tErrorStream()); |
| 82 CharStreams.copy(inputStreamReader, sb); | 85 CharStreams.copy(inputStreamReader, sb); |
| 83 process.getErrorStream().close(); | 86 process.getErrorStream().close(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 104 suite.addTest(new TestCase("Configuration problem") { | 107 suite.addTest(new TestCase("Configuration problem") { |
| 105 @Override | 108 @Override |
| 106 public void runBare() throws Throwable { | 109 public void runBare() throws Throwable { |
| 107 fail(message); | 110 fail(message); |
| 108 } | 111 } |
| 109 }); | 112 }); |
| 110 return suite; | 113 return suite; |
| 111 } | 114 } |
| 112 } | 115 } |
| 113 } | 116 } |
| OLD | NEW |