Chromium Code Reviews| 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 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1007 * Java server. | 1007 * Java server. |
| 1008 */ | 1008 */ |
| 1009 void _startSeleniumServer() { | 1009 void _startSeleniumServer() { |
| 1010 // Get the absolute path to the Selenium jar. | 1010 // Get the absolute path to the Selenium jar. |
| 1011 String filePath = new Options().script; | 1011 String filePath = new Options().script; |
| 1012 String pathSep = new Platform().pathSeparator(); | 1012 String pathSep = new Platform().pathSeparator(); |
| 1013 int index = filePath.lastIndexOf(pathSep); | 1013 int index = filePath.lastIndexOf(pathSep); |
| 1014 filePath = filePath.substring(0, index) + '${pathSep}testing${pathSep}'; | 1014 filePath = filePath.substring(0, index) + '${pathSep}testing${pathSep}'; |
| 1015 var dir = new Directory(filePath); | 1015 var dir = new Directory(filePath); |
| 1016 dir.onFile = (String file) { | 1016 dir.onFile = (String file) { |
| 1017 if (const RegExp("selenium-server-standalone-.*\.jar").hasMatch(file) | 1017 if (const RegExp(@"selenium-server-standalone-.*\.jar").hasMatch(file) |
|
Emily Fortuna
2012/03/13 00:30:32
But if we add the @ character, we'd be using a raw
| |
| 1018 && _seleniumServer == null) { | 1018 && _seleniumServer == null) { |
| 1019 _seleniumServer = new Process.start('java', ['-jar', file]); | 1019 _seleniumServer = new Process.start('java', ['-jar', file]); |
| 1020 // Heads up: there seems to an obscure data race of some form in | 1020 // Heads up: there seems to an obscure data race of some form in |
| 1021 // the VM between launching the server process and launching the test | 1021 // the VM between launching the server process and launching the test |
| 1022 // tasks that disappears when you read IO (which is convenient, since | 1022 // tasks that disappears when you read IO (which is convenient, since |
| 1023 // that is our condition for knowing that the server is ready). | 1023 // that is our condition for knowing that the server is ready). |
| 1024 StringInputStream stdoutStringStream = | 1024 StringInputStream stdoutStringStream = |
| 1025 new StringInputStream(_seleniumServer.stdout); | 1025 new StringInputStream(_seleniumServer.stdout); |
| 1026 StringInputStream stderrStringStream = | 1026 StringInputStream stderrStringStream = |
| 1027 new StringInputStream(_seleniumServer.stderr); | 1027 new StringInputStream(_seleniumServer.stderr); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1105 // the developer doesn't waste his or her time trying to fix a bunch of | 1105 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1106 // tests that appear to be broken but were actually just flakes that | 1106 // tests that appear to be broken but were actually just flakes that |
| 1107 // didn't get retried because there had already been one failure. | 1107 // didn't get retried because there had already been one failure. |
| 1108 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1108 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1109 new RunningProcess(test, allowRetry, this).start(); | 1109 new RunningProcess(test, allowRetry, this).start(); |
| 1110 } | 1110 } |
| 1111 _numProcesses++; | 1111 _numProcesses++; |
| 1112 } | 1112 } |
| 1113 } | 1113 } |
| 1114 } | 1114 } |
| OLD | NEW |