Skip to content

Commit

Permalink
Chore: Add mads-hartmann.bash-ide-vscode and ms-python.python as depe…
Browse files Browse the repository at this point in the history
…ndencies
  • Loading branch information
idillon-sfl authored and deribaucourt committed Nov 28, 2023
1 parent e63ecea commit f78bdb0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/client",
"--extensionTestsPath=${workspaceRoot}/integration-tests/out/index",
"--disable-extensions",
"--disable-workspace-trust",
"${workspaceRoot}/integration-tests/project-folder"
],
Expand Down
4 changes: 4 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"engines": {
"vscode": "^1.75.0"
},
"extensionDependencies": [
"mads-hartmann.bash-ide-vscode",
"ms-python.python"
],
"categories": [
"Programming Languages"
],
Expand Down
33 changes: 29 additions & 4 deletions integration-tests/src/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand All @@ -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')
Expand Down

0 comments on commit f78bdb0

Please sign in to comment.