From 5231db62cb9b121602120e3ebecc1bbeeb6ec49c Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Wed, 23 Nov 2016 10:27:06 -0800 Subject: [PATCH] Defect/mac build failure (#404) * added error output to extension test command * fixed workspace * changed junit path slashses --- gulpfile.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 7f90b41224..e53bc88985 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -117,9 +117,17 @@ gulp.task('ext:copy', gulp.series('ext:copy-tests', 'ext:copy-js', 'ext:copy-con gulp.task('ext:build', gulp.series('ext:lint', 'ext:compile', 'ext:copy')); gulp.task('ext:test', (done) => { - process.env.JUNIT_REPORT_PATH = process.env['WORKSPACE'] + '\\test-reports\\ext_xunit.xml'; - cproc.execSync('code --extensionDevelopmentPath="%WORKSPACE%" --extensionTestsPath="%WORKSPACE%/out/test" --verbose'); - done(); + let workspace = process.env['WORKSPACE']; + process.env.JUNIT_REPORT_PATH = workspace + '/test-reports/ext_xunit.xml'; + cproc.exec(`code --extensionDevelopmentPath="${workspace}" --extensionTestsPath="${workspace}/out/test" --verbose`, (error, stdout, stderr) => { + if (error) { + console.error(`exec error: ${error}`); + process.exit(1); + } + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); + done(); + }); }); gulp.task('test', gulp.series('html:test', 'ext:test'));