Skip to content

Commit

Permalink
Try to get dependent extensions in place for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsjohnmurray committed Nov 13, 2024
1 parent 4ac159f commit a7a2b81
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,25 @@ async function main() {
const vscodeExecutablePath = await downloadAndUnzipVSCode("stable");
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);

const installExtension = (extId) =>
cp.spawnSync(cli, [...args, "--install-extension", extId], {
encoding: "utf-8",
stdio: "inherit",
});

// Install dependent extensions
installExtension("intersystems-community.servermanager");
installExtension("intersystems-community.vscode-objectscript");
// Use cp.spawn / cp.exec for custom setup
cp.spawnSync(
cli,
[...args, '--install-extension', 'intersystems-community.servermanager', '--install-extension', 'intersystems-community.vscode-objectscript'],
{
encoding: 'utf-8',
stdio: 'inherit'
}
);

// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
// Run the extension test
await runTests({
// Use the specified `code` executable
vscodeExecutablePath,
extensionDevelopmentPath,
extensionTestsPath
});
} catch (err) {
console.error("Failed to run tests", err);
process.exit(1);
}
Expand Down

0 comments on commit a7a2b81

Please sign in to comment.