forked from yoctoproject/vscode-bitbake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Add mads-hartmann.bash-ide-vscode and ms-python.python as depe…
…ndencies
- Loading branch information
1 parent
e63ecea
commit f78bdb0
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,31 @@ | |
* 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' | ||
|
||
import { runTests } from '@vscode/test-electron' | ||
import { | ||
downloadAndUnzipVSCode, | ||
resolveCliArgsFromVSCodeExecutablePath, | ||
runTests | ||
} from '@vscode/test-electron' | ||
|
||
async function main (): Promise<void> { | ||
try { | ||
const vscodeExecutablePath = await downloadAndUnzipVSCode('1.84.2') | ||
const [cliPath, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath) | ||
|
||
cp.spawnSync( | ||
cliPath, | ||
[ | ||
...args, | ||
'--install-extension', '[email protected]', | ||
'--install-extension', '[email protected]' | ||
], | ||
{ | ||
encoding: 'utf-8', | ||
stdio: 'inherit' | ||
} | ||
) | ||
// The folder containing the Extension Manifest package.json | ||
// Passed to `--extensionDevelopmentPath` | ||
const extensionDevelopmentPath = path.resolve(__dirname, '../../client/') | ||
|
@@ -19,11 +38,17 @@ async function main (): Promise<void> { | |
|
||
const testWorkspace = path.resolve(__dirname, '../../integration-tests/project-folder') | ||
|
||
const launchArgs = ['--disable-extensions', '--disable-workspace-trust', testWorkspace] | ||
const launchArgs = ['--disable-workspace-trust', testWorkspace] | ||
const extensionTestsEnv = {} | ||
|
||
// Download VS Code, unzip it and run the integration test | ||
await runTests({ launchArgs, extensionDevelopmentPath, extensionTestsPath, extensionTestsEnv }) | ||
await runTests({ | ||
launchArgs, | ||
vscodeExecutablePath, | ||
extensionDevelopmentPath, | ||
extensionTestsPath, | ||
extensionTestsEnv | ||
}) | ||
} catch (err) { | ||
console.error(err) | ||
console.error('Failed to run tests') | ||
|