From 4c97828706eb246df4992b78f44cf2c7a7ccc778 Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 12:07:38 -0800 Subject: [PATCH 1/6] fix azure builds --- build/build.yml | 5 ----- gulpfile.js | 12 +++--------- install.js | 7 ------- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 install.js diff --git a/build/build.yml b/build/build.yml index dcbf499f8..1912b86bd 100644 --- a/build/build.yml +++ b/build/build.yml @@ -39,11 +39,6 @@ steps: verbose: false customCommand: 'install -g gulp-cli' -- task: Gulp@0 - displayName: 'gulp install' - inputs: - targets: install - - bash: | export BUILDMACHINE=true export VsMsSqlEnv=dev diff --git a/gulpfile.js b/gulpfile.js index 30877500a..9cc3b8fe0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,5 @@ var gulp = require('gulp'); var rename = require('gulp-rename'); -var install = require('gulp-install'); var gulpTsLint = require('gulp-tslint'); var ts = require('gulp-typescript'); var tslint = require('tslint'); @@ -256,8 +255,8 @@ gulp.task('ext:test', async () => { launchArgs: args }); } catch (error) { - console.log(`stdout: ${stdout}`); - console.log(`stderr: ${stderr}`); + console.log(`stdout: ${process.stdout}`); + console.log(`stderr: ${process.stderr}`); console.error(`exec error: ${error}`); throw(error); } @@ -273,13 +272,8 @@ gulp.task('clean', function (done) { gulp.task('build', gulp.series('clean', 'ext:build', 'ext:install-service')); -gulp.task('install', function() { - return gulp.src(['./package.json']) - .pipe(install()); -}); - gulp.task('watch', function(){ return gulp.watch(config.paths.project.root + '/src/**/*', gulp.series('build')) }); -// gulp.task('lint', gulp.series('ext:lint')); +gulp.task('lint', gulp.series('ext:lint')); diff --git a/install.js b/install.js deleted file mode 100644 index 41e4d5328..000000000 --- a/install.js +++ /dev/null @@ -1,7 +0,0 @@ -var gulp = require('gulp'); -var install = require('gulp-install'); - -gulp.task('install', function(){ - return gulp.src(['./package.json']) - .pipe(install()); -}); \ No newline at end of file From 4249d420d6d3d9bae8ce474a592d888111f255f5 Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 14:41:06 -0800 Subject: [PATCH 2/6] use js syntax --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 9cc3b8fe0..2328cdb55 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -237,7 +237,7 @@ gulp.task('ext:localization', gulp.series('ext:localization:xliff-to-ts', 'ext:l gulp.task('ext:build', gulp.series('ext:localization', 'ext:copy', 'ext:clean-library-ts-files', 'ext:compile', 'ext:compile-view')); // removed lint before copy -gulp.task('ext:test', async () => { +gulp.task('ext:test', async function () { let workspace = process.env['WORKSPACE']; if (!workspace) { workspace = process.cwd(); From 0961300b1066a0b3c48554958b1d6638981b46d5 Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 15:06:31 -0800 Subject: [PATCH 3/6] fix vscode type version --- gulpfile.js | 3 ++- package.json | 2 +- yarn.lock | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2328cdb55..dbecf8ee6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -237,7 +237,7 @@ gulp.task('ext:localization', gulp.series('ext:localization:xliff-to-ts', 'ext:l gulp.task('ext:build', gulp.series('ext:localization', 'ext:copy', 'ext:clean-library-ts-files', 'ext:compile', 'ext:compile-view')); // removed lint before copy -gulp.task('ext:test', async function () { +gulp.task('ext:test', async (done) => { let workspace = process.env['WORKSPACE']; if (!workspace) { workspace = process.cwd(); @@ -254,6 +254,7 @@ gulp.task('ext:test', async function () { extensionTestsPath: extensionTestsPath, launchArgs: args }); + done(); } catch (error) { console.log(`stdout: ${process.stdout}`); console.log(`stderr: ${process.stderr}`); diff --git a/package.json b/package.json index b73e0d440..dd3483ff1 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@types/mocha": "^5.2.7", "@types/tmp": "0.0.28", "@types/underscore": "1.8.3", - "@types/vscode": "^1.1.33", + "@types/vscode": "^1.38.0", "assert": "^1.4.1", "chai": "^3.5.0", "copy-paste": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 4193f5ae1..9b96fea42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -120,7 +120,7 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.8.3.tgz#d3cb512dd3dde32b2bbba4be0ca68bd3dad4a1f5" integrity sha512-DP70788BXjp9+CKArXOUlNkZaXa+rHonDpbqH3/74ez16dLL5z2/bMT37etbln5J+H9M07NbRUyduDIoTM2tnw== -"@types/vscode@^1.1.33": +"@types/vscode@^1.38.0": version "1.41.0" resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.41.0.tgz#b0d75920220f84e07093285e59180c0f11d336cd" integrity sha512-7SfeY5u9jgiELwxyLB3z7l6l/GbN9CqpCQGkcRlB7tKRFBxzbz2PoBfGrLxI1vRfUCIq5+hg5vtDHExwq5j3+A== From da986cf8a86a535a08f1e92dca7e30949b83df37 Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 15:25:06 -0800 Subject: [PATCH 4/6] change gulp --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index dbecf8ee6..01ff65375 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -237,7 +237,7 @@ gulp.task('ext:localization', gulp.series('ext:localization:xliff-to-ts', 'ext:l gulp.task('ext:build', gulp.series('ext:localization', 'ext:copy', 'ext:clean-library-ts-files', 'ext:compile', 'ext:compile-view')); // removed lint before copy -gulp.task('ext:test', async (done) => { +gulp.task('ext:test', async function (done) { let workspace = process.env['WORKSPACE']; if (!workspace) { workspace = process.cwd(); From 266da91336cad995a36fa9d97d89068ecd844332 Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 15:48:24 -0800 Subject: [PATCH 5/6] change gulp test --- gulpfile.js | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 01ff65375..bc96c8af6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -237,7 +237,7 @@ gulp.task('ext:localization', gulp.series('ext:localization:xliff-to-ts', 'ext:l gulp.task('ext:build', gulp.series('ext:localization', 'ext:copy', 'ext:clean-library-ts-files', 'ext:compile', 'ext:compile-view')); // removed lint before copy -gulp.task('ext:test', async function (done) { +gulp.task('ext:test', (done) => { let workspace = process.env['WORKSPACE']; if (!workspace) { workspace = process.cwd(); @@ -245,22 +245,36 @@ gulp.task('ext:test', async function (done) { process.env.JUNIT_REPORT_PATH = workspace + '/test-reports/ext_xunit.xml'; var args = ['--verbose', '--disable-gpu', '--disable-telemetry', '--disable-updates', '-n']; let vscodeVersion = packageJson.engines.vscode.slice(1); - let vscodePath = await vscodeTest.downloadAndUnzipVSCode(vscodeVersion); let extensionTestsPath = `${workspace}/out/test`; - try { - await vscodeTest.runTests({ - vscodeExecutablePath: vscodePath, - extensionDevelopmentPath: workspace, - extensionTestsPath: extensionTestsPath, - launchArgs: args - }); - done(); - } catch (error) { - console.log(`stdout: ${process.stdout}`); - console.log(`stderr: ${process.stderr}`); - console.error(`exec error: ${error}`); - throw(error); - } + // try { + // await vscodeTest.runTests({ + // vscodeExecutablePath: vscodePath, + // extensionDevelopmentPath: workspace, + // extensionTestsPath: extensionTestsPath, + // launchArgs: args + // }); + // done(); + // } catch (error) { + // console.log(`stdout: ${process.stdout}`); + // console.log(`stderr: ${process.stderr}`); + // console.error(`exec error: ${error}`); + // throw(error); + // } + vscodeTest.downloadAndUnzipVSCode(vscodeVersion).then((vscodePath) => { + if (vscodePath) { + vscodeTest.runTests({ + vscodeExecutablePath: vscodePath, + extensionDevelopmentPath: workspace, + extensionTestsPath: extensionTestsPath, + launchArgs: args + }).then(() => done()).catch((error) => { + console.log(`stdout: ${process.stdout}`); + console.log(`stderr: ${process.stderr}`); + console.error(`exec error: ${error}`); + throw(error); + }); + } + }) }); gulp.task('test', gulp.series('ext:test')); From 57a358e57255a360505341be177d1a7be1ac57ac Mon Sep 17 00:00:00 2001 From: abist Date: Wed, 18 Dec 2019 16:03:27 -0800 Subject: [PATCH 6/6] remove comment --- gulpfile.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bc96c8af6..3c588144e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -246,20 +246,6 @@ gulp.task('ext:test', (done) => { var args = ['--verbose', '--disable-gpu', '--disable-telemetry', '--disable-updates', '-n']; let vscodeVersion = packageJson.engines.vscode.slice(1); let extensionTestsPath = `${workspace}/out/test`; - // try { - // await vscodeTest.runTests({ - // vscodeExecutablePath: vscodePath, - // extensionDevelopmentPath: workspace, - // extensionTestsPath: extensionTestsPath, - // launchArgs: args - // }); - // done(); - // } catch (error) { - // console.log(`stdout: ${process.stdout}`); - // console.log(`stderr: ${process.stderr}`); - // console.error(`exec error: ${error}`); - // throw(error); - // } vscodeTest.downloadAndUnzipVSCode(vscodeVersion).then((vscodePath) => { if (vscodePath) { vscodeTest.runTests({