Skip to content

Commit ce9c88f

Browse files
committed
Merge branch 'main' into failure-patterns
This is to get the flaky mac CI test fix
2 parents 667e064 + 024d14d commit ce9c88f

File tree

6 files changed

+31
-11
lines changed

6 files changed

+31
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ Features:
1212

1313
Improvements:
1414

15+
- Add name de-mangling for C++ symbols in the Test Explorer view when running tests with coverage. [#4340](https://github.com/microsoft/vscode-cmake-tools/pull/4340) [@rjaegers](https://github.com/rjaegers)
1516
- No longer convert paths on lowercase on MacOS to enable cpp tools to resolve them. [#4325](https://github.com/microsoft/vscode-cmake-tools/pull/4325) [@tringenbach](https://github.com/tringenbach)
1617

1718
Bug Fixes:
1819

1920
- Fix bug that makes `Configure Task` lists only first folder in workspace. [#3232](https//github.com/microsoft/vscode-cmake-tools/issues/3232)
20-
- Fix displaying "Go to Test" in the Test Explorer when the DEF_SOURCE_LINE property is set, but there is no backtrace information present. [4321](https://github.com/microsoft/vscode-cmake-tools/pull/4321) [@rjaegers](https://github.com/rjaegers)
21+
- Fix displaying "Go to Test" in the Test Explorer when the DEF_SOURCE_LINE property is set, but there is no backtrace information present. [#4321](https://github.com/microsoft/vscode-cmake-tools/pull/4321) [@rjaegers](https://github.com/rjaegers)
2122
- Fix gnuld error parsing false positive on make errors, false negative due to trailing \r, and false parsing of new "multiple definitions" error [#2864](https://github.com/microsoft/vscode-cmake-tools/issues/2864) [@0xemgy](https://github.com/0xemgy)
2223
- Fixes for small bug string bugs. [#4319](https://github.com/microsoft/vscode-cmake-tools/issues/4319), [#4317](https://github.com/microsoft/vscode-cmake-tools/issues/4317), [#4312](https://github.com/microsoft/vscode-cmake-tools/issues/4312)
2324
- Fixes localization for "workspace is" string. [#4374](https://github.com/microsoft/vscode-cmake-tools/issues/4374)
2425
- Make tooltips for selecting Launch/Debug Target. [#4373](https://github.com/microsoft/vscode-cmake-tools/issues/4373)
2526
- Fix bug where unrelated symlinks are read as variant files [#4304](https://github.com/microsoft/vscode-cmake-tools/issues/4304) [@vitorramos](https://github.com/vitorramos).
2627
- Fix evaluation of conditions in presets. [#4425](https://github.com/microsoft/vscode-cmake-tools/issues/4425)
2728
- Fix ENOENT error at vscode startup on some circumstances [#2855](https://github.com/microsoft/vscode-cmake-tools/issues/2855) Contributed by STMicroelectronics
29+
- Fix repeat execution option in test presets [#4443](https://github.com/microsoft/vscode-cmake-tools/issues/4443)
2830

2931
## 1.20.53
3032

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3852,6 +3852,7 @@
38523852
"@types/chai": "^4.2.15",
38533853
"@types/chai-as-promised": "^7.1.3",
38543854
"@types/chai-string": "^1.4.2",
3855+
"@types/demangler-js": "^0.1.0",
38553856
"@types/js-yaml": "^4.0.0",
38563857
"@types/json5": "~0.0.30",
38573858
"@types/lodash": "4.14.202",
@@ -3902,10 +3903,11 @@
39023903
"webpack-cli": "^4.5.0"
39033904
},
39043905
"dependencies": {
3905-
"@friedemannsommer/lcov-parser": "^4.0.1",
3906+
"@friedemannsommer/lcov-parser": "^5.0.0",
39063907
"@types/string.prototype.matchall": "^4.0.4",
39073908
"ajv": "^7.1.0",
39083909
"chokidar": "^3.5.1",
3910+
"demangler-js": "^0.1.7",
39093911
"handlebars": "^4.7.7",
39103912
"iconv-lite": "^0.6.2",
39113913
"js-yaml": "^4.0.0",

src/coverage.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import * as vscode from 'vscode';
2-
import { lcovParser } from "@friedemannsommer/lcov-parser";
32
import * as nls from 'vscode-nls';
43
import * as logging from '@cmt/logging';
4+
import { demangle } from 'demangler-js';
55
import { platformNormalizePath } from './util';
66

7+
const { lcovParser } = require("@friedemannsommer/lcov-parser");
8+
79
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
810
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
911

@@ -61,7 +63,8 @@ export async function handleCoverageInfoFiles(run: vscode.TestRun, coverageInfoF
6163

6264
const declarations: vscode.DeclarationCoverage[] = [];
6365
for (const declaration of section.functions.details) {
64-
declarations.push(new vscode.DeclarationCoverage(declaration.name, declaration.hit,
66+
const demangledName = demangle(declaration.name);
67+
declarations.push(new vscode.DeclarationCoverage(demangledName, declaration.hit,
6568
new vscode.Position(declaration.line - 1, 0)));
6669
}
6770

src/presets/preset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ export function testArgs(preset: TestPreset): string[] {
23912391
preset.execution.resourceSpecFile && result.push('--resource-spec-file', preset.execution.resourceSpecFile);
23922392
preset.execution.testLoad && result.push('--test-load', preset.execution.testLoad.toString());
23932393
preset.execution.showOnly && result.push('--show-only', preset.execution.showOnly);
2394-
preset.execution.repeat && result.push(`--repeat ${preset.execution.repeat.mode}:${preset.execution.repeat.count}`);
2394+
preset.execution.repeat && result.push('--repeat', `${preset.execution.repeat.mode}:${preset.execution.repeat.count}`);
23952395
preset.execution.interactiveDebugging && result.push('--interactive-debug-mode 1');
23962396
preset.execution.interactiveDebugging === false && result.push('--interactive-debug-mode 0');
23972397
preset.execution.scheduleRandom && result.push('--schedule-random');

test/end-to-end-tests/single-root-UI/test/coverage.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ suite('Coverage integration', () => {
6767
await vscode.workspace.getConfiguration('cmake', vscode.workspace.workspaceFolders![0].uri).update('postRunCoverageTarget', 'capture-coverage');
6868

6969
const testResult: any = await vscode.commands.executeCommand('testing.coverage.uri', vscode.Uri.file(testEnv.projectFolder.location));
70-
expect(testResult['tasks'][0].hasCoverage).to.be.eq(true);
71-
expect(testResult['items'][2].computedState).to.be.eq(TestResultState.Passed);
70+
if (testResult !== undefined) {
71+
// May or may not be undefined in this case evidently based on platform
72+
expect(testResult['tasks'][0].hasCoverage).to.be.eq(true);
73+
expect(testResult['items'][2].computedState).to.be.eq(TestResultState.Passed);
74+
}
7275
expect(fs.existsSync(path.join(testEnv.projectFolder.location, testEnv.buildLocation, 'lcov.info'))).to.be.true;
7376
}).timeout(60000);
7477
});

yarn.lock

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@
165165
minimatch "^3.1.2"
166166
strip-json-comments "^3.1.1"
167167

168-
"@friedemannsommer/lcov-parser@^4.0.1":
169-
version "4.0.1"
170-
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@friedemannsommer/lcov-parser/-/lcov-parser-4.0.1.tgz#192445df2095bb061fd889ea0b0f0f94bf7c58b7"
171-
integrity sha512-NjXrxLeh77FUAL6TzVJyvYvgA2AS+t2hlfRmfOyE5HR3g+2HdLNFTP2l+zTypn5JTnV4jfXgwSO46JLhvJeXlw==
168+
"@friedemannsommer/lcov-parser@^5.0.0":
169+
version "5.0.0"
170+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@friedemannsommer/lcov-parser/-/lcov-parser-5.0.0.tgz#dbda48ac22ece7f3d5df7fb183d68267025eccf4"
171+
integrity sha512-YeK97qJgG/AEPee19qA1TtAFgXR1OSjKK9nIOnUPVF3eLFam+VMRii1GGtG60uAeqSWaGwBkTQ6RvYkSULDrTA==
172172

173173
"@gulp-sourcemaps/identity-map@^2.0.1":
174174
version "2.0.1"
@@ -547,6 +547,11 @@
547547
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@types/chai/-/chai-4.3.1.tgz"
548548
integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==
549549

550+
"@types/demangler-js@^0.1.0":
551+
version "0.1.0"
552+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@types/demangler-js/-/demangler-js-0.1.0.tgz#938a0f160ece42b3cf8d46f3b0ab1218f46821e6"
553+
integrity sha1-k4oPFg7OQrPPjUbzsKsSGPRoIeY=
554+
550555
"@types/estree@^1.0.5":
551556
version "1.0.6"
552557
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
@@ -2232,6 +2237,11 @@ delegates@^1.0.0:
22322237
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/delegates/-/delegates-1.0.0.tgz"
22332238
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
22342239

2240+
demangler-js@^0.1.7:
2241+
version "0.1.7"
2242+
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/demangler-js/-/demangler-js-0.1.7.tgz#42454730da691746e35c5e8861900192be1cbc4d"
2243+
integrity sha1-QkVHMNppF0bjXF6IYZABkr4cvE0=
2244+
22352245
deprecation@^2.0.0, deprecation@^2.3.1:
22362246
version "2.3.1"
22372247
resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/deprecation/-/deprecation-2.3.1.tgz"

0 commit comments

Comments
 (0)