Skip to content

Commit 85a50bb

Browse files
authored
Hack to work around microsoft/vscode#178241 (#1515)
- Fixes #1363 ## Checklist - [x] Fails when test case legitimately fails - [x] Retries when test case fails with "codewindow unresponsive" - [x] Succeeds when test case succeeds - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [x] I have not broken the cheatsheet
1 parent 2b0a50c commit 85a50bb

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

packages/test-harness/src/scripts/runTestsCI.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getCursorlessRepoRoot } from "@cursorless/common";
66
import * as path from "path";
77
import { launchVscodeAndRunTests } from "../util/launchVscodeAndRunTests";
88

9-
async function main() {
9+
(async function main() {
1010
// Note that we run all tests, including unit tests, in VSCode, even though
1111
// unit tests could be run separately. If we wanted to run unit tests
1212
// separately, we could instead use `../runners/endToEndOnly` instead of
@@ -18,6 +18,4 @@ async function main() {
1818
);
1919

2020
await launchVscodeAndRunTests(extensionTestsPath);
21-
}
22-
23-
main();
21+
})();

packages/test-harness/src/util/launchVscodeAndRunTests.ts

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as cp from "child_process";
22
import * as path from "path";
3+
import * as os from "os";
34
import {
45
downloadAndUnzipVSCode,
56
resolveCliArgsFromVSCodeExecutablePath,
@@ -55,21 +56,24 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
5556
},
5657
);
5758

59+
console.log("finished installing dependency extensions");
60+
5861
// Run the integration test
59-
await runTests({
62+
const code = await runTests({
6063
vscodeExecutablePath,
6164
extensionDevelopmentPath,
6265
extensionTestsPath,
63-
// Note: Crash dump causes legacy VSCode to hang, so we just don't bother
64-
launchArgs: useLegacyVscode
65-
? undefined
66-
: [
67-
`--crash-reporter-directory=${crashDir}`,
68-
`--logsPath=${logsDir}`,
69-
"--disable-gpu",
70-
"--disable-software-rasterizer",
71-
],
66+
// Note: Crash dump causes legacy VSCode and Windows to hang, so we just
67+
// don't bother. Can be re-enabled if we ever need it; on windows it only
68+
// hangs some of the time, so might be enough to get a crash dump when you
69+
// need it.
70+
launchArgs:
71+
useLegacyVscode || os.platform() === "win32"
72+
? undefined
73+
: [`--crash-reporter-directory=${crashDir}`, `--logsPath=${logsDir}`],
7274
});
75+
76+
console.log(`Returned from "runTests" with value: ${code}`);
7377
} catch (err) {
7478
console.error("Test run threw exception:");
7579
console.error(err);

0 commit comments

Comments
 (0)