@@ -14,20 +14,14 @@ suite('GNATtest Integration Tests', function () {
1414 } ) ;
1515 test ( 'Generate Tests' , async ( ) => {
1616 await contextClients . adaClient . onReady ( ) ;
17- const projectFile = vscode . workspace . asRelativePath (
18- await getProjectFile ( contextClients . adaClient )
19- ) ;
20- if ( vscode . workspace . workspaceFolders ) {
21- const fpath = path . join ( vscode . workspace . workspaceFolders [ 0 ] . uri . path , projectFile ) ;
22- cp . execSync ( 'gnattest -P ' + fpath , { timeout : 60000 } ) ;
23- } else {
24- throw new Error ( 'No workspace folder found for the specified URI' ) ;
25- }
17+ const projectFile = await getProjectFile ( contextClients . adaClient ) ;
18+ // Generate tests and redirect the stderr to stdout if command failed
19+ cp . execSync ( 'gnattest -P ' + projectFile + ' 2>&1' , { timeout : 60000 } ) ;
2620 } ) ;
2721 test ( 'Build & Run the tests' , ( ) => {
2822 if ( vscode . workspace . workspaceFolders ) {
2923 const ext : string = process . platform == 'win32' ? '.exe' : '' ;
30- const cwd = vscode . workspace . workspaceFolders [ 0 ] . uri . path ;
24+ const cwd = vscode . workspace . workspaceFolders [ 0 ] . uri . fsPath ;
3125
3226 cp . execSync (
3327 'gprbuild -P ' + path . join ( cwd , 'obj' , 'gnattest' , 'harness' , 'test_driver.gpr' ) ,
@@ -57,7 +51,7 @@ suite('GNATtest Integration Tests', function () {
5751 } ) ;
5852 test ( 'Read & Parse & compare the results' , async ( ) => {
5953 if ( vscode . workspace . workspaceFolders ) {
60- const cwd = vscode . workspace . workspaceFolders [ 0 ] . uri . path ;
54+ const cwd = vscode . workspace . workspaceFolders [ 0 ] . uri . fsPath ;
6155 const resultPath = path . join ( cwd , 'obj' , 'gnattest' , 'result.txt' ) ;
6256 const result = await gnattest . readResultFile ( resultPath ) ;
6357 assert . notStrictEqual (
0 commit comments