Skip to content

Commit 9b1d82f

Browse files
Merge branch 'topic/test_results' into 'master'
Remove hyperlinks in the Test Results output See merge request eng/ide/ada_language_server!1999
2 parents f46a554 + 13d167d commit 9b1d82f

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

integration/vscode/ada/src/gnattest.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -900,32 +900,40 @@ async function buildTestDriverAndReportErrors(
900900
const result = await runTaskSequence(buildTasks, new WriteEmitter(run));
901901

902902
if (result != 0) {
903-
let msg =
904-
`Error while building the test harness project.` +
903+
let markdownMsg =
904+
`Failed to build the test harness project.` +
905905
` Check the [Problems](command:workbench.panel.markers.view.focus) view` +
906906
` and the [Terminal](command:terminal.focus) view for more information.`;
907907

908908
if (coverage) {
909909
const taskName = `${TASK_TYPE_ADA}: ${TASK_GNATCOV_SETUP.label}`;
910910
const taskNameEncoded = taskName.replace(/:/g, '%3A').replace(/ /g, '%20');
911-
msg +=
911+
markdownMsg +=
912912
`\n\nIf the errors relate to the GNATcoverage runtime library,` +
913913
` remember to set it up using the` +
914914
` [${taskName}]` +
915915
`(command:workbench.action.tasks.runTask?%22${taskNameEncoded}%22) task.`;
916916
}
917917

918-
prepareAndAppendOutput(run, msg);
918+
// Display a simple error message in the Tests Results view
919+
prepareAndAppendOutput(
920+
run,
921+
'Failed to build the test harness project: check the ' +
922+
'Problems and the Terminal views for more information.',
923+
);
919924

920-
const md = new vscode.MarkdownString(msg);
921-
md.isTrusted = true;
922-
const testMsg = new vscode.TestMessage(md);
923925
/**
924926
* Mark each test as errored, not failed, since the tests can't run
925927
* because of the build error.
928+
* Attach a proper markdown message to each failed test, with hyperlinks
929+
* pointing the user to the Problems and the Terminal views.
926930
*/
931+
const md = new vscode.MarkdownString(markdownMsg);
932+
md.isTrusted = true;
933+
const testMsg = new vscode.TestMessage(md);
927934
testsToRun.forEach((test) => run.errored(test, testMsg));
928-
throw Error(msg);
935+
936+
throw Error(markdownMsg);
929937
}
930938
}
931939

0 commit comments

Comments
 (0)