Skip to content

Commit d40ef7d

Browse files
committed
Merge branch 'topic/fix-gnattest-integration' into 'master'
Fix gnattest integration Closes #1580 See merge request eng/ide/ada_language_server!1881
2 parents 2f51f24 + 715c057 commit d40ef7d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

integration/vscode/ada/src/gnattest.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,13 +706,23 @@ async function buildTestDriver(run: vscode.TestRun) {
706706
*/
707707
const driverPrjPath = await getGnatTestDriverProjectPath();
708708
run.appendOutput(`Building the test harness project\r\n`);
709-
const gprbuild = logAndRun(run, ['gprbuild', '-P', driverPrjPath, "'-cargs:ada'", '-gnatef']);
709+
/**
710+
* The following arguments are passed directly to the spawned subprocess.
711+
* It not necessary nor appropriate to apply shell quoting here.
712+
*/
713+
const gprbuild = logAndRun(run, ['gprbuild', '-P', driverPrjPath, '-cargs:ada', '-gnatef']);
710714

711715
prepareAndAppendOutput(run, gprbuild.stdout.toLocaleString());
712716
prepareAndAppendOutput(run, gprbuild.stderr.toLocaleString());
713717

714718
if (gprbuild.status !== 0) {
715-
throw Error('Error while building the test driver');
719+
throw Error(
720+
'Error while building the test driver:\n' +
721+
gprbuild.output
722+
.filter((x) => x != null)
723+
.map((x) => x.toLocaleString())
724+
.join('\n'),
725+
);
716726
}
717727
}
718728

0 commit comments

Comments
 (0)