@@ -900,32 +900,40 @@ async function buildTestDriverAndReportErrors(
900
900
const result = await runTaskSequence ( buildTasks , new WriteEmitter ( run ) ) ;
901
901
902
902
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.` +
905
905
` Check the [Problems](command:workbench.panel.markers.view.focus) view` +
906
906
` and the [Terminal](command:terminal.focus) view for more information.` ;
907
907
908
908
if ( coverage ) {
909
909
const taskName = `${ TASK_TYPE_ADA } : ${ TASK_GNATCOV_SETUP . label } ` ;
910
910
const taskNameEncoded = taskName . replace ( / : / g, '%3A' ) . replace ( / / g, '%20' ) ;
911
- msg +=
911
+ markdownMsg +=
912
912
`\n\nIf the errors relate to the GNATcoverage runtime library,` +
913
913
` remember to set it up using the` +
914
914
` [${ taskName } ]` +
915
915
`(command:workbench.action.tasks.runTask?%22${ taskNameEncoded } %22) task.` ;
916
916
}
917
917
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
+ ) ;
919
924
920
- const md = new vscode . MarkdownString ( msg ) ;
921
- md . isTrusted = true ;
922
- const testMsg = new vscode . TestMessage ( md ) ;
923
925
/**
924
926
* Mark each test as errored, not failed, since the tests can't run
925
927
* 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.
926
930
*/
931
+ const md = new vscode . MarkdownString ( markdownMsg ) ;
932
+ md . isTrusted = true ;
933
+ const testMsg = new vscode . TestMessage ( md ) ;
927
934
testsToRun . forEach ( ( test ) => run . errored ( test , testMsg ) ) ;
928
- throw Error ( msg ) ;
935
+
936
+ throw Error ( markdownMsg ) ;
929
937
}
930
938
}
931
939
0 commit comments