Skip to content

Commit 6c9d8a5

Browse files
authored
Merge pull request #1782 from 333fred/tests-in-containing-symbol
Add RunTestsInContext Command
2 parents 7278aba + f9310a2 commit 6c9d8a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+816
-180
lines changed

.pipelines/init.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
22
# Configuration: Release
33
Verbosity: Normal
4-
DotNetVersion: "3.0.100"
4+
DotNetVersion: "3.1.201"
55
CakeVersion: "0.32.1"
66
NuGetVersion: "4.9.2"
77
steps:

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resources:
2222

2323
variables:
2424
Verbosity: Diagnostic
25-
DotNetVersion: "3.0.100"
25+
DotNetVersion: "3.1.201"
2626
CakeVersion: "0.32.1"
2727
NuGetVersion: "4.9.2"
2828
GitVersionVersion: "5.0.1"
@@ -105,7 +105,7 @@ jobs:
105105

106106
- job: Windows
107107
pool:
108-
vmImage: "VS2017-Win2016"
108+
vmImage: "windows-latest"
109109
dependsOn: GitVersion
110110
steps:
111111
- template: ./.pipelines/init.yml

build.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"DotNetInstallScriptURL": "https://dot.net/v1",
33
"DotNetChannel": "Preview",
44
"DotNetVersions": [
5-
"3.0.100",
5+
"3.1.201",
66
"5.0.100-preview.2.20169.1"
77
],
88
"RequiredMonoVersion": "6.6.0",
@@ -41,7 +41,7 @@
4141
"ProjectWithDisabledAnalyzers",
4242
"ProjectWithDisabledAnalyzers2",
4343
"ProjectWithAnalyzers",
44-
"NetCore30Project",
44+
"NetCore31Project",
4545
"Net50Project",
4646
"ProjectWithAnalyzersAndEditorConfig",
4747
"ProjectWithParentEditorConfig"

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.0.100"
3+
"version": "3.1.201"
44
}
55
}

omnisharp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"script": {
33
"enableScriptNuGetReferences": true,
4-
"defaultTargetFramework": "netcoreapp3.0"
4+
"defaultTargetFramework": "netcoreapp3.1"
55
}
6-
}
6+
}

src/OmniSharp.Abstractions/OmniSharpEndpoints.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ public static class V2
5555
public const string RunAllTestsInClass = "/v2/runtestsinclass";
5656
public const string DebugTestGetStartInfo = "/v2/debugtest/getstartinfo";
5757
public const string DebugTestLaunch = "/v2/debugtest/launch";
58+
public const string DebugTestsInContextGetStartInfo = "/v2/debugtestsincontext/getstartinfo";
5859
public const string DebugTestStop = "/v2/debugtest/stop";
5960
public const string DebugTestsInClassGetStartInfo = "/v2/debugtestsinclass/getstartinfo";
61+
public const string RunTestsInContext = "/v2/runtestsincontext";
6062

6163
public const string BlockStructure = "/v2/blockstructure";
6264
public const string CodeStructure = "/v2/codestructure";

src/OmniSharp.DotNetTest/DebugSessionManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Diagnostics;
44
using System.Threading;
55
using System.Threading.Tasks;
6+
using Microsoft.CodeAnalysis;
67
using Microsoft.Extensions.Logging;
78
using OmniSharp.DotNetTest.Models;
89
using OmniSharp.Utilities;
@@ -79,7 +80,7 @@ public void EndSession()
7980

8081
public Task<DebugTestGetStartInfoResponse> DebugGetStartInfoAsync(string methodName, string runSettings, string testFrameworkName, string targetFrameworkVersion, CancellationToken cancellationToken)
8182
=> DebugGetStartInfoAsync(new string[] { methodName }, runSettings, testFrameworkName, targetFrameworkVersion, cancellationToken);
82-
83+
8384
public Task<DebugTestGetStartInfoResponse> DebugGetStartInfoAsync(string[] methodNames, string runSettings, string testFrameworkName, string targetFrameworkVersion, CancellationToken cancellationToken)
8485
{
8586
VerifySession(isStarted: true);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#nullable enable
2+
3+
using OmniSharp.Models;
4+
5+
namespace OmniSharp.DotNetTest.Models
6+
{
7+
public abstract class BaseTestsInContextRequest : Request
8+
{
9+
public string? RunSettings { get; set; }
10+
/// <summary>
11+
/// e.g. .NETCoreApp, Version=2.0
12+
/// </summary>
13+
public string? TargetFrameworkVersion { get; set; }
14+
}
15+
}

src/OmniSharp.DotNetTest/Models/DebugTestGetStartInfoResponse.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ public class DebugTestGetStartInfoResponse
88
public string Arguments { get; set; }
99
public string WorkingDirectory { get; set; }
1010
public IDictionary<string, string> EnvironmentVariables { get; set; }
11+
public bool Succeeded { get; set; }
12+
public bool ContextHadNoTests { get; set; }
13+
public string FailureReason { get; set; }
1114
}
1215
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#nullable enable
2+
3+
using OmniSharp.Mef;
4+
5+
namespace OmniSharp.DotNetTest.Models
6+
{
7+
[OmniSharpEndpoint(OmniSharpEndpoints.V2.DebugTestsInContextGetStartInfo, typeof(DebugTestsInContextGetStartInfoRequest), typeof(DebugTestGetStartInfoResponse))]
8+
public class DebugTestsInContextGetStartInfoRequest : BaseTestsInContextRequest
9+
{
10+
}
11+
}

0 commit comments

Comments
 (0)