Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library test_progress; | 5 library test_progress; |
| 6 | 6 |
| 7 import "dart:io"; | 7 import "dart:io"; |
| 8 import "dart:io" as io; | 8 import "dart:io" as io; |
| 9 import "http_server.dart" as http_server; | 9 import "http_server.dart" as http_server; |
| 10 import "status_file_parser.dart"; | 10 import "status_file_parser.dart"; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 } | 121 } |
| 122 if (test is BrowserTestCase) { | 122 if (test is BrowserTestCase) { |
| 123 // Additional command for rerunning the steps locally after the fact. | 123 // Additional command for rerunning the steps locally after the fact. |
| 124 var command = | 124 var command = |
| 125 test.configuration["_servers_"].httpServerCommandline(); | 125 test.configuration["_servers_"].httpServerCommandline(); |
| 126 output.add(''); | 126 output.add(''); |
| 127 output.add('To retest, run: $command'); | 127 output.add('To retest, run: $command'); |
| 128 } | 128 } |
| 129 for (var i = 0; i < test.commands.length; i++) { | 129 for (var i = 0; i < test.commands.length; i++) { |
| 130 var command = test.commands[i]; | 130 var command = test.commands[i]; |
| 131 var commandOutput = test.commandOutputs[command]; | |
| 131 output.add(''); | 132 output.add(''); |
| 132 output.add('Command[$i]: $command'); | 133 output.add('Command[$i]: $command'); |
| 134 if (commandOutput != null) { | |
|
kustermann
2013/06/20 08:05:28
I think we should not print it out together with t
ricow1
2013/06/20 08:23:11
It will be messed up with tons of output in certai
| |
| 135 output.add('Took ${commandOutput.time}'); | |
| 136 } else { | |
| 137 output.add('Did not run'); | |
| 138 } | |
| 133 } | 139 } |
| 134 return output; | 140 return output; |
| 135 } | 141 } |
| 136 | 142 |
| 137 String _buildSummaryEnd(int failedTests) { | 143 String _buildSummaryEnd(int failedTests) { |
| 138 if (failedTests == 0) { | 144 if (failedTests == 0) { |
| 139 return '\n===\n=== All tests succeeded\n===\n'; | 145 return '\n===\n=== All tests succeeded\n===\n'; |
| 140 } else { | 146 } else { |
| 141 var pluralSuffix = failedTests != 1 ? 's' : ''; | 147 var pluralSuffix = failedTests != 1 ? 's' : ''; |
| 142 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; | 148 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 print('@@@BUILD_STEP $stepName failures@@@'); | 526 print('@@@BUILD_STEP $stepName failures@@@'); |
| 521 } | 527 } |
| 522 for (String line in _failureSummary) { | 528 for (String line in _failureSummary) { |
| 523 print(line); | 529 print(line); |
| 524 } | 530 } |
| 525 print(''); | 531 print(''); |
| 526 } | 532 } |
| 527 print(_buildSummaryEnd(_failedTests)); | 533 print(_buildSummaryEnd(_failedTests)); |
| 528 } | 534 } |
| 529 } | 535 } |
| OLD | NEW |