Capture separate logs for each lsptoolshost test suite#8529
Capture separate logs for each lsptoolshost test suite#8529
Conversation
| Defines the lowest supported target framework for the extension. | ||
| Used by server download / integration tests to ensure they run when only this SDK is installed. | ||
| --> | ||
| <CheckEolTargetFramework>false</CheckEolTargetFramework> |
There was a problem hiding this comment.
Noticed project loading did not like running on a .NET 10 preview while building net6.0 projects.
|
|
||
| import * as vscode from 'vscode'; | ||
| import { EOL, platform } from 'os'; | ||
| import { describe, expect, test } from '@jest/globals'; |
There was a problem hiding this comment.
Separated these helpers out because they use @jest/globals and importing it isn't allowed in the test runner (index.ts).
| // We have to fix up the file path because the test file was discovered in the /out/ directory. | ||
| file = file.substring(0, file.length - 2) + 'ts'; | ||
| file = file.replace(/[\\/]out[\\/]/, path.sep); | ||
| file = workingDirectory[0] + file.substring(1); |
There was a problem hiding this comment.
So locally __dirname is returning the drive letter lowercased and the filepaths also are lowercased. Jest fails to match the paths to a test suite if I don't bring in a correct drive letter. Thankfully the working directory has the correct casing. Figure on unix-like platforms it should basically be a no-op.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| .map((file) => path.join(__dirname, file)); | ||
|
|
||
| for (let file of testFiles) { | ||
| // We have to fix up the file path because the test file was discovered in the /out/ directory. |
There was a problem hiding this comment.
do sourcemaps still work if we do this? e.g. f5 launching integration tests is fine?
There was a problem hiding this comment.
our launch targets set the TEST_FILTER_FILE so it shouldn't run this bit of code.
|
|
||
| const targetLogDir = path.join( | ||
| path.dirname(exports.logDirectory), | ||
| `${name ?? 'unknown'}_${path.basename(exports.logDirectory)}` |
There was a problem hiding this comment.
can remove unknown, name isn't nullable here
| const workingDirectory = process.cwd(); | ||
|
|
||
| const testFiles = (await fsExtra.readdir(__dirname)) | ||
| .filter((file) => file.endsWith('.integration.test.js')) |
There was a problem hiding this comment.
instead of doing this, I think you could probably simplify all this by getting the rootPath here, and then just go directly to the typescript files?
|
|
||
| process.env.TEST_FILE_FILTER = file; | ||
|
|
||
| results = await runIntegrationTests(jestIntegrationTestProjectName); |
There was a problem hiding this comment.
There was a problem hiding this comment.
The current runs logs should still be in the logs folder even if they aren't moved.

No description provided.