-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix offline packaging using event stream #2138
Changes from 7 commits
2bb2962
e829569
a3199f5
dcadd23
4055740
07ed7aa
5e79909
3ca01c6
761dd54
de7d8da
bc78964
0966fc1
fcbdc5e
2e8e647
0eeb691
9aee396
649cb45
fb3ae4c
4abeeba
ce7d68e
cfbf862
197fc85
e206c9b
1006877
ef8c30c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as chai from 'chai'; | ||
import * as glob from 'glob-promise'; | ||
import * as path from 'path'; | ||
import { invokeCommand } from './testAssets/testAssets'; | ||
import { PlatformInformation } from '../../src/platform'; | ||
import * as fs from 'async-file'; | ||
|
||
suite("Offline packaging of VSIX", function () { | ||
let vsixFiles: string[]; | ||
this.timeout(2000000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this timeout is in milliseconds, that means this test takes nearly 30 minutes to run in travis? Probably not desirable to run that on every build? |
||
|
||
suiteSetup(() => { | ||
chai.should(); | ||
let args: string[] = []; | ||
args.push(path.join("node_modules", "gulp", "bin", "gulp.js")); | ||
args.push("package:offline"); | ||
invokeCommand(args); | ||
vsixFiles = glob.sync(path.join(process.cwd(), '**', '*.vsix')); | ||
}); | ||
|
||
test("Exactly 3 vsix files should be produced", () => { | ||
vsixFiles.length.should.be.equal(3, "the build should produce exactly 3 vsix files"); | ||
}); | ||
|
||
[ | ||
new PlatformInformation('win32', 'x86_64'), | ||
new PlatformInformation('darwin', 'x86_64'), | ||
new PlatformInformation('linux', 'x86_64') | ||
].forEach(element => { | ||
test(`Given Platform: ${element.platform} and Architecture: ${element.architecture}, the vsix file is created`, () => { | ||
vsixFiles.findIndex(elem => elem.indexOf(element.platform) != -1).should.not.be.equal(-1); | ||
vsixFiles.findIndex(elem => elem.indexOf(element.architecture) != -1).should.not.be.equal(-1); | ||
}); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as cp from 'child_process'; | ||
import * as path from 'path'; | ||
|
||
export function invokeCommand(args: string[]){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. invokeNode? invokeCommand sounds like it could invoke any program |
||
let proc = cp.spawnSync('node', args); | ||
if (proc.error) { | ||
console.error(proc.error.toString()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this get enabled?