rustdoc-gui/tester: print full filename on error

This makes it easier to find the test that needs fixing.
This commit is contained in:
Jacob Hoffman-Andrews 2021-11-21 21:09:23 -08:00
parent ce3f3a5ffa
commit f377ac5e66

View File

@ -194,7 +194,7 @@ async function main(argv) {
.then(out => { .then(out => {
const [output, nb_failures] = out; const [output, nb_failures] = out;
results[nb_failures === 0 ? "successful" : "failed"].push({ results[nb_failures === 0 ? "successful" : "failed"].push({
file_name: file_name, file_name: testPath,
output: output, output: output,
}); });
if (nb_failures > 0) { if (nb_failures > 0) {
@ -206,7 +206,7 @@ async function main(argv) {
}) })
.catch(err => { .catch(err => {
results.errored.push({ results.errored.push({
file_name: file_name, file_name: testPath + file_name,
output: err, output: err,
}); });
status_bar.erroneous(); status_bar.erroneous();
@ -239,7 +239,7 @@ async function main(argv) {
console.log(""); console.log("");
results.failed.sort(by_filename); results.failed.sort(by_filename);
results.failed.forEach(r => { results.failed.forEach(r => {
console.log(r.output); console.log(r.file_name, r.output);
}); });
} }
if (results.errored.length > 0) { if (results.errored.length > 0) {
@ -247,7 +247,7 @@ async function main(argv) {
// print run errors on the bottom so developers see them better // print run errors on the bottom so developers see them better
results.errored.sort(by_filename); results.errored.sort(by_filename);
results.errored.forEach(r => { results.errored.forEach(r => {
console.error(r.output); console.error(r.file_name, r.output);
}); });
} }