Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: tools/testing/dart/test_progress.dart

Issue 13521002: Remove \r in command stdout/stderr when building failure a failure output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 prefix = ' '; 91 prefix = ' ';
92 } 92 }
93 } 93 }
94 if (!test.lastCommandOutput.stdout.isEmpty) { 94 if (!test.lastCommandOutput.stdout.isEmpty) {
95 output.add(''); 95 output.add('');
96 output.add('stdout:'); 96 output.add('stdout:');
97 if (test.lastCommandOutput.command.isPixelTest) { 97 if (test.lastCommandOutput.command.isPixelTest) {
98 output.add('DRT pixel test failed! stdout is not printed because it ' 98 output.add('DRT pixel test failed! stdout is not printed because it '
99 'contains binary data!'); 99 'contains binary data!');
100 } else { 100 } else {
101 output.add(decodeUtf8(test.lastCommandOutput.stdout)); 101 output.addAll(decodeUtf8(test.lastCommandOutput.stdout)
102 .replaceAll('\r\n', '\n').split('\n'));
ahe 2013/04/03 10:13:58 How about creating a method for this? I suggest y
kustermann 2013/04/03 12:52:13 Done.
102 } 103 }
103 } 104 }
104 if (!test.lastCommandOutput.stderr.isEmpty) { 105 if (!test.lastCommandOutput.stderr.isEmpty) {
105 output.add(''); 106 output.add('');
106 output.add('stderr:'); 107 output.add('stderr:');
107 output.add(decodeUtf8(test.lastCommandOutput.stderr)); 108 output.addAll(decodeUtf8(test.lastCommandOutput.stderr)
109 .replaceAll('\r\n', '\n').split('\n'));
108 } 110 }
109 if (test is BrowserTestCase) { 111 if (test is BrowserTestCase) {
110 // Additional command for rerunning the steps locally after the fact. 112 // Additional command for rerunning the steps locally after the fact.
111 var command = 113 var command =
112 test.configuration["_servers_"].httpServerCommandline(); 114 test.configuration["_servers_"].httpServerCommandline();
113 output.add('To retest, run: $command'); 115 output.add('To retest, run: $command');
114 } 116 }
115 for (Command c in test.commands) { 117 for (Command c in test.commands) {
116 output.add(''); 118 output.add('');
117 String message = (c == test.commands.last 119 String message = (c == test.commands.last
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 print('@@@STEP_FAILURE@@@'); 510 print('@@@STEP_FAILURE@@@');
509 print('@@@BUILD_STEP $stepName failures@@@'); 511 print('@@@BUILD_STEP $stepName failures@@@');
510 for (String line in _failureSummary) { 512 for (String line in _failureSummary) {
511 print(line); 513 print(line);
512 } 514 }
513 print(''); 515 print('');
514 } 516 }
515 super.allDone(); 517 super.allDone();
516 } 518 }
517 } 519 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698