Skip to content

Commit 9673035

Browse files
committed
Specify the sln when running a builld.
1 parent 86e9acc commit 9673035

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

test/runIntegrationTests.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ import * as path from 'path';
88
import { runTests } from 'vscode-test';
99
import { execChildProcess } from '../src/common';
1010

11+
function getSln(workspacePath: string): string | undefined {
12+
if (workspacePath.endsWith("slnWithCsproj")) {
13+
return "b_SecondInOrder_SlnFile.sln";
14+
}
15+
else if (workspacePath.endsWith("slnFilterWithCsproj")) {
16+
return "SolutionFile.sln";
17+
}
18+
19+
return undefined;
20+
}
21+
1122
async function main() {
1223
try {
1324
// The folder containing the Extension Manifest package.json
@@ -29,9 +40,12 @@ async function main() {
2940

3041
console.log(`workspace path = '${workspacePath}'`);
3142

32-
// Run a build before the tests, to ensure that source generators are set up correctly
33-
const dotnetPath = path.join(process.env.DOTNET_ROOT, 'dotnet');
34-
await execChildProcess(`${dotnetPath} build`, workspacePath);
43+
const sln = getSln(workspacePath);
44+
if (sln) {
45+
// Run a build before the tests, to ensure that source generators are set up correctly
46+
const dotnetPath = path.join(process.env.DOTNET_ROOT, 'dotnet');
47+
await execChildProcess(`${dotnetPath} build ${sln}`, workspacePath);
48+
}
3549

3650
// Download VS Code, unzip it and run the integration test
3751
await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [workspacePath, '-n', '--verbose'], extensionTestsEnv: process.env });

0 commit comments

Comments
 (0)