Skip to content

Commit

Permalink
test: workaround for MacOS test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed May 1, 2023
1 parent 1db4c35 commit bf1476c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ node_modules
.vscode-test/
*.vsix
*.log

testTmp/*
!.gitkeep
!README.md
8 changes: 7 additions & 1 deletion src/test/runLatestTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ async function main() {
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
const extensionTestsPath = path.resolve(__dirname, './suite/index');

// https://github.com/microsoft/vscode/issues/86382
const tmpDir = path.resolve(__dirname, '..', '../testTmp');

// latest version test
try {
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: ['--disable-extensions']
launchArgs: [
'--user-data-dir', tmpDir,
'--disable-extensions',
]
});
} catch (err) {
console.log(err);
Expand Down
8 changes: 7 additions & 1 deletion src/test/runMinSupportVersionTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ async function main() {
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
const extensionTestsPath = path.resolve(__dirname, './suite/index');

// https://github.com/microsoft/vscode/issues/86382
const tmpDir = path.resolve(__dirname, '..', '../testTmp');

// v1.70.0 test
const vscodeExecutablePath = await downloadAndUnzipVSCode('1.70.0');
try {
await runTests({
vscodeExecutablePath,
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: ['--disable-extensions']
launchArgs: [
'--user-data-dir', tmpDir,
'--disable-extensions',
]
});
} catch (err) {
console.log(err);
Expand Down
Empty file added testTmp/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions testTmp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is a workaround to solve issues related to testing on MacOS. It will output test data, so there's no need to commit it.

> See: https://github.com/microsoft/vscode/issues/86382

0 comments on commit bf1476c

Please sign in to comment.