Skip to content

Commit f377ac5

Browse files
committed
rustdoc-gui/tester: print full filename on error
This makes it easier to find the test that needs fixing.
1 parent ce3f3a5 commit f377ac5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/rustdoc-gui/tester.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async function main(argv) {
194194
.then(out => {
195195
const [output, nb_failures] = out;
196196
results[nb_failures === 0 ? "successful" : "failed"].push({
197-
file_name: file_name,
197+
file_name: testPath,
198198
output: output,
199199
});
200200
if (nb_failures > 0) {
@@ -206,7 +206,7 @@ async function main(argv) {
206206
})
207207
.catch(err => {
208208
results.errored.push({
209-
file_name: file_name,
209+
file_name: testPath + file_name,
210210
output: err,
211211
});
212212
status_bar.erroneous();
@@ -239,15 +239,15 @@ async function main(argv) {
239239
console.log("");
240240
results.failed.sort(by_filename);
241241
results.failed.forEach(r => {
242-
console.log(r.output);
242+
console.log(r.file_name, r.output);
243243
});
244244
}
245245
if (results.errored.length > 0) {
246246
console.log(os.EOL);
247247
// print run errors on the bottom so developers see them better
248248
results.errored.sort(by_filename);
249249
results.errored.forEach(r => {
250-
console.error(r.output);
250+
console.error(r.file_name, r.output);
251251
});
252252
}
253253

0 commit comments

Comments
 (0)