Skip to content

Commit ae1abb6

Browse files
committed
Decouple SampleTestProjects for Lsp and TestExplorer test projects
FsAutoComplete.Tests.TestExplorer expects the sample projects to be built once before the tests are run, but FsAutoComplete.Tests.Lsp expects the sample projects to be build for every test. Splitting up the sample projects reduces chances that they could break each other when the run in parallel or in random order
1 parent c6c1c7a commit ae1abb6

File tree

22 files changed

+137
-85
lines changed

22 files changed

+137
-85
lines changed

FsAutoComplete.sln

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "benchmarks", "benchmarks\be
2929
EndProject
3030
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsAutoComplete.Tests.TestExplorer", "test\FsAutoComplete.Tests.TestExplorer\FsAutoComplete.Tests.TestExplorer.fsproj", "{C6CE23AF-EDCE-49ED-AC2F-8AD595C30CD8}"
3131
EndProject
32-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleTestProjects", "SampleTestProjects", "{B093584B-EEA2-D526-B6EB-76B356047302}"
33-
EndProject
34-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "VSTest.XUnit.Tests", "test\SampleTestProjects\VSTest.XUnit.Tests\VSTest.XUnit.Tests.fsproj", "{2C67BFBE-0963-4BD6-B292-7CF838C153C3}"
35-
EndProject
36-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "VSTest.XUnit.RunResults", "test\SampleTestProjects\VSTest.XUnit.RunResults\VSTest.XUnit.RunResults.fsproj", "{C7B0B178-79BD-4071-B134-17ABA3168EC4}"
37-
EndProject
3832
Global
3933
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4034
Debug|Any CPU = Debug|Any CPU
@@ -141,30 +135,6 @@ Global
141135
{C6CE23AF-EDCE-49ED-AC2F-8AD595C30CD8}.Release|x64.Build.0 = Release|Any CPU
142136
{C6CE23AF-EDCE-49ED-AC2F-8AD595C30CD8}.Release|x86.ActiveCfg = Release|Any CPU
143137
{C6CE23AF-EDCE-49ED-AC2F-8AD595C30CD8}.Release|x86.Build.0 = Release|Any CPU
144-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
145-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
146-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|x64.ActiveCfg = Debug|Any CPU
147-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|x64.Build.0 = Debug|Any CPU
148-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|x86.ActiveCfg = Debug|Any CPU
149-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Debug|x86.Build.0 = Debug|Any CPU
150-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
151-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|Any CPU.Build.0 = Release|Any CPU
152-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|x64.ActiveCfg = Release|Any CPU
153-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|x64.Build.0 = Release|Any CPU
154-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|x86.ActiveCfg = Release|Any CPU
155-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3}.Release|x86.Build.0 = Release|Any CPU
156-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
157-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
158-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|x64.ActiveCfg = Debug|Any CPU
159-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|x64.Build.0 = Debug|Any CPU
160-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|x86.ActiveCfg = Debug|Any CPU
161-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Debug|x86.Build.0 = Debug|Any CPU
162-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
163-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|Any CPU.Build.0 = Release|Any CPU
164-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|x64.ActiveCfg = Release|Any CPU
165-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|x64.Build.0 = Release|Any CPU
166-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|x86.ActiveCfg = Release|Any CPU
167-
{C7B0B178-79BD-4071-B134-17ABA3168EC4}.Release|x86.Build.0 = Release|Any CPU
168138
EndGlobalSection
169139
GlobalSection(SolutionProperties) = preSolution
170140
HideSolutionNode = FALSE
@@ -175,9 +145,6 @@ Global
175145
{14C55B44-2063-4891-98BE-8184CAB1BE87} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
176146
{C58701B0-D8E3-4B68-A7DE-8524C95F86C0} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
177147
{C6CE23AF-EDCE-49ED-AC2F-8AD595C30CD8} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
178-
{B093584B-EEA2-D526-B6EB-76B356047302} = {443E0B8D-9AD0-436E-A331-E8CC12965F07}
179-
{2C67BFBE-0963-4BD6-B292-7CF838C153C3} = {B093584B-EEA2-D526-B6EB-76B356047302}
180-
{C7B0B178-79BD-4071-B134-17ABA3168EC4} = {B093584B-EEA2-D526-B6EB-76B356047302}
181148
EndGlobalSection
182149
GlobalSection(ExtensibilityGlobals) = postSolution
183150
SolutionGuid = {1C4EE83B-632A-4929-8C96-38F14254229E}

test/SampleTestProjects/VSTest.XUnit.RunResults/Program.fs renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.RunResults/Program.fs

File renamed without changes.

test/SampleTestProjects/VSTest.XUnit.RunResults/Tests.fs renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.RunResults/Tests.fs

File renamed without changes.

test/SampleTestProjects/VSTest.XUnit.RunResults/VSTest.XUnit.RunResults.fsproj renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.RunResults/VSTest.XUnit.RunResults.fsproj

File renamed without changes.

test/SampleTestProjects/VSTest.XUnit.Tests/Program.fs renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.Tests/Program.fs

File renamed without changes.

test/SampleTestProjects/VSTest.XUnit.Tests/Tests.fs renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.Tests/Tests.fs

File renamed without changes.

test/SampleTestProjects/VSTest.XUnit.Tests/VSTest.XUnit.Tests.fsproj renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/VSTest.XUnit.Tests/VSTest.XUnit.Tests.fsproj

File renamed without changes.

test/SampleTestProjects/paket.dependencies renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/paket.dependencies

File renamed without changes.

test/SampleTestProjects/paket.lock renamed to test/FsAutoComplete.Tests.Lsp/SampleTestProjects/paket.lock

File renamed without changes.

test/FsAutoComplete.Tests.Lsp/TestExplorerTests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let tests createServer =
3939
[ testCaseAsync "it should report tests of all basic outcomes"
4040
<| async {
4141
let workspaceRoot =
42-
Path.Combine(__SOURCE_DIRECTORY__, "..", "SampleTestProjects", "VSTest.XUnit.RunResults")
42+
Path.Combine(__SOURCE_DIRECTORY__, "SampleTestProjects", "VSTest.XUnit.RunResults")
4343

4444
let! server, _ = initializeServer workspaceRoot
4545
use server = server
@@ -72,7 +72,7 @@ let tests createServer =
7272
testCaseAsync "it should report a processId when debugging a test project"
7373
<| async {
7474
let workspaceRoot =
75-
Path.Combine(__SOURCE_DIRECTORY__, "..", "SampleTestProjects", "VSTest.XUnit.RunResults")
75+
Path.Combine(__SOURCE_DIRECTORY__, "SampleTestProjects", "VSTest.XUnit.RunResults")
7676

7777
let! server, clientNotifications = initializeServer workspaceRoot
7878

@@ -121,7 +121,7 @@ let tests createServer =
121121
"it should inherit environment variables from it's parent, allowing tests to depend on environment variables"
122122
<| async {
123123
let workspaceRoot =
124-
Path.Combine(__SOURCE_DIRECTORY__, "..", "SampleTestProjects", "VSTest.XUnit.RunResults")
124+
Path.Combine(__SOURCE_DIRECTORY__, "SampleTestProjects", "VSTest.XUnit.RunResults")
125125

126126
let! server, _ = initializeServer workspaceRoot
127127

0 commit comments

Comments
 (0)