Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/test-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.9",
"@types/tail": "2.2.3",
"@vscode/test-electron": "^2.4.1",
"@vscode/test-electron": "^2.5.2",
"cross-spawn": "7.0.5",
"mocha": "^10.7.3"
},
Expand Down
9 changes: 3 additions & 6 deletions packages/test-harness/src/launchVscodeAndRunTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
"packages/cursorless-vscode/dist",
);

const crashDir = getEnvironmentVariableStrict("VSCODE_CRASH_DIR");
const logsDir = getEnvironmentVariableStrict("VSCODE_LOGS_DIR");
// const crashDir = getEnvironmentVariableStrict("VSCODE_CRASH_DIR");
// const logsDir = getEnvironmentVariableStrict("VSCODE_LOGS_DIR");
const useLegacyVscode =
getEnvironmentVariableStrict("APP_VERSION") === "legacy";

Expand Down Expand Up @@ -81,10 +81,7 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
// don't bother. Can be re-enabled if we ever need it; on windows it only
// hangs some of the time, so might be enough to get a crash dump when you
// need it.
launchArgs:
useLegacyVscode || os.platform() === "win32"
? undefined
: [`--crash-reporter-directory=${crashDir}`, `--logsPath=${logsDir}`],
launchArgs: ["--force-node-api-uncaught-exceptions-policy=true"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good thing but curious what prompted it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test-electron crashes on windows with edit code 0. So ci pass even though the tests crashes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this argument isn't available in electron. Electron apparently enforces note options quite strictly.

});

console.log(`Returned from "runTests" with value: ${code}`);
Expand Down
3 changes: 3 additions & 0 deletions packages/test-harness/src/runAllTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ async function runTestsInDir(
// Add files to the test suite
files.forEach((f) => mocha.addFile(path.resolve(testRoot, f)));

console.log(`Running tests in ${testRoot} for ${files.length} files`);
console.log(process.argv);

try {
// Run the mocha test
await new Promise<void>((resolve, reject) => {
Expand Down
Loading
Loading