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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 var command = test.commands[i]; | 130 var command = test.commands[i]; |
131 var commandOutput = test.commandOutputs[command]; | 131 var commandOutput = test.commandOutputs[command]; |
132 output.add(''); | 132 output.add(''); |
133 output.add('Command[$i]: $command'); | 133 output.add('Command[$i]: $command'); |
134 if (commandOutput != null) { | 134 if (commandOutput != null) { |
135 output.add('Took ${commandOutput.time}'); | 135 output.add('Took ${commandOutput.time}'); |
136 } else { | 136 } else { |
137 output.add('Did not run'); | 137 output.add('Did not run'); |
138 } | 138 } |
139 } | 139 } |
140 | |
141 var arguments = ['python', 'tools${Platform.pathSeparator}test.py']; | |
ricow1
2013/06/20 13:54:50
just write /
python understands that, even on stra
kustermann
2013/06/20 14:17:24
"even on strange operating system": I like it :-)
| |
142 arguments.addAll(test.configuration['_reproducing_arguments_']); | |
143 arguments.add(test.displayName); | |
144 var testPyCommandline = arguments.map(escapeCommandLineArgument).join(' '); | |
145 | |
146 output.add(''); | |
147 output.add('Short reproduction command (experimental):'); | |
148 output.add(" $testPyCommandline"); | |
140 return output; | 149 return output; |
141 } | 150 } |
142 | 151 |
143 String _buildSummaryEnd(int failedTests) { | 152 String _buildSummaryEnd(int failedTests) { |
144 if (failedTests == 0) { | 153 if (failedTests == 0) { |
145 return '\n===\n=== All tests succeeded\n===\n'; | 154 return '\n===\n=== All tests succeeded\n===\n'; |
146 } else { | 155 } else { |
147 var pluralSuffix = failedTests != 1 ? 's' : ''; | 156 var pluralSuffix = failedTests != 1 ? 's' : ''; |
148 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; | 157 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; |
149 } | 158 } |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
526 print('@@@BUILD_STEP $stepName failures@@@'); | 535 print('@@@BUILD_STEP $stepName failures@@@'); |
527 } | 536 } |
528 for (String line in _failureSummary) { | 537 for (String line in _failureSummary) { |
529 print(line); | 538 print(line); |
530 } | 539 } |
531 print(''); | 540 print(''); |
532 } | 541 } |
533 print(_buildSummaryEnd(_failedTests)); | 542 print(_buildSummaryEnd(_failedTests)); |
534 } | 543 } |
535 } | 544 } |
OLD | NEW |