-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test matrix #3459
Test matrix #3459
Changes from 61 commits
dfb2e81
aff2f4a
83a9fc6
07e4782
7536588
a94b1bd
ef668f0
4fb3b26
8b04531
e57fe1d
98fa6b9
6342ee4
4f95d81
b62a26d
c7de6ad
f15ade9
115b842
100b4dd
cdaf3d0
390d80b
543c21c
76021d2
4a79dc0
de7aefc
1bddbc8
c4e7ff1
bbd4473
7c6d946
f38616a
c9dbf4e
79117c9
ecdb18e
a65c00a
0fc39cf
3b14bb4
aaecf7f
82cb607
07cdf1c
1b0202a
d556525
d243b59
1d22cd9
82ad320
5216498
0f087c0
63e6275
1a45042
6e84158
2b3e039
5987391
0e4ce5a
969c2b3
8423de3
9894fa3
5af7437
81c0b1b
eff69de
874f1c2
5f3f5c2
a1a461c
5a19d19
0075b0b
85085dc
efc810f
02c7d41
57be8db
ab3093f
3e637fc
2ac14cb
020abf0
55e8714
ebb15a1
23b5f66
1d9003c
a8e8476
25c5802
0e063a4
4dd10bc
fd235c1
68c4e4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,4 +196,6 @@ static Microsoft.VisualStudio.TestPlatform.VsTestConsole.TranslationLayer.Resour | |
static Microsoft.VisualStudio.TestPlatform.VsTestConsole.TranslationLayer.Resources.Resources.InvalidFilePath.get -> string | ||
static Microsoft.VisualStudio.TestPlatform.VsTestConsole.TranslationLayer.Resources.Resources.ResourceManager.get -> System.Resources.ResourceManager | ||
static Microsoft.VisualStudio.TestPlatform.VsTestConsole.TranslationLayer.Resources.Resources.VsTestProcessExitedAbnormally.get -> string | ||
virtual Microsoft.TestPlatform.VsTestConsole.TranslationLayer.TestSession.Dispose(bool disposing) -> void | ||
virtual Microsoft.TestPlatform.VsTestConsole.TranslationLayer.TestSession.Dispose(bool disposing) -> void | ||
Microsoft.TestPlatform.VsTestConsole.TranslationLayer.ConsoleParameters.EnvironmentVariables.get -> System.Collections.Generic.Dictionary<string, string> | ||
Microsoft.TestPlatform.VsTestConsole.TranslationLayer.ConsoleParameters.EnvironmentVariables.set -> void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unlike the change for 17.3, this keeps the behavior of deleting all variables if you provide any. You have to replay all system, user, and process env variables to the process. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
Microsoft.TestPlatform.VsTestConsole.TranslationLayer.ConsoleParameters.EnvironmentVariables.get -> System.Collections.Generic.Dictionary<string, string> | ||
Microsoft.TestPlatform.VsTestConsole.TranslationLayer.ConsoleParameters.EnvironmentVariables.set -> void | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,6 @@ public void StartProcess(ConsoleParameters consoleParameters) | |
|
||
EqtTrace.Verbose("VsTestCommandLineWrapper: Process Start Info {0} {1}", info.FileName, info.Arguments); | ||
|
||
#if NETFRAMEWORK | ||
if (consoleParameters.EnvironmentVariables != null) | ||
{ | ||
info.EnvironmentVariables.Clear(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unlike the change for 17.3, this keeps the behavior of deleting all variables if you provide any. It just enables the api for .net core. |
||
|
@@ -133,7 +132,7 @@ public void StartProcess(ConsoleParameters consoleParameters) | |
} | ||
} | ||
} | ||
#endif | ||
|
||
try | ||
{ | ||
_process = Process.Start(info); | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,6 +2,7 @@ | |||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||||||
|
||||||
using System; | ||||||
using System.Linq; | ||||||
|
||||||
using Microsoft.TestPlatform.TestUtilities; | ||||||
|
||||||
|
@@ -51,6 +52,17 @@ public class AcceptanceTestBase : IntegrationTestBase | |||||
public const string NETCORE21_50 = "netcoreapp2.1;netcoreapp3.1;net5.0"; | ||||||
public const string NETFX452_NET50 = "net452;net461;net472;net48;netcoreapp2.1;netcoreapp3.1;net5.0"; | ||||||
public const string NETFX452_NET31 = "net452;net461;net472;net48;netcoreapp2.1;netcoreapp3.1"; | ||||||
public const string DEFAULT_RUNNER_NETFX = "net451"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit
Suggested change
|
||||||
/// <summary> | ||||||
/// Our current defaults for .NET and .NET Framework. | ||||||
/// </summary> | ||||||
public const string DEFAULT_RUNNER_NETFX_AND_NET = $"{DEFAULT_RUNNER_NETFX};netcoreapp2.1"; | ||||||
Evangelink marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
public const string DEFAULT_HOST_NETFX_AND_NET = "net451;netcoreapp2.1"; | ||||||
Evangelink marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
public const string LATEST_TO_LEGACY = "Latest;LatestPreview;LatestStable;RecentStable;MostDownloaded;PreviousStable;LegacyStable"; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit
Suggested change
|
||||||
public const string LATESTPREVIEW_TO_LEGACY = "LatestPreview;LatestStable;RecentStable;MostDownloaded;PreviousStable;LegacyStable"; | ||||||
public const string LATEST = "Latest"; | ||||||
public const string LATESTSTABLE= "LatestStable"; | ||||||
internal const string MSTEST = "MSTest"; | ||||||
|
||||||
public static string And(string left, string right) | ||||||
{ | ||||||
|
@@ -61,6 +73,11 @@ public static string And(string left, string right) | |||||
|
||||||
protected static void SetTestEnvironment(IntegrationTestEnvironment testEnvironment, RunnerInfo runnerInfo) | ||||||
{ | ||||||
testEnvironment.VSTestConsoleInfo = runnerInfo.VSTestConsoleInfo; | ||||||
// The order here matters, it changes how the resulting path is built when we resolve test dlls and other assets. | ||||||
testEnvironment.DllInfos = new[] { runnerInfo.AdapterInfo, runnerInfo.TestHostInfo }.Where(d => d != null).ToList(); | ||||||
testEnvironment.DebugInfo = runnerInfo.DebugInfo; | ||||||
|
||||||
testEnvironment.RunnerFramework = runnerInfo.RunnerFramework; | ||||||
testEnvironment.TargetFramework = runnerInfo.TargetFramework; | ||||||
testEnvironment.InIsolationValue = runnerInfo.InIsolationValue; | ||||||
|
@@ -96,17 +113,37 @@ protected string GetTargetFramworkForRunsettings() | |||||
} | ||||||
|
||||||
/// <summary> | ||||||
/// Default RunSettings | ||||||
/// Empty runsettings, just with the RunSettings tag that we require. | ||||||
/// </summary> | ||||||
/// <returns></returns> | ||||||
public string GetEmptyRunsettings() | ||||||
{ | ||||||
return "<RunSettings></RunSettings>"; | ||||||
} | ||||||
|
||||||
/// <summary> | ||||||
/// Almost empty runsettings, just specifying the target framework from the currently set test environment. | ||||||
/// </summary> | ||||||
public string GetDefaultRunSettings() | ||||||
{ | ||||||
string runSettingsXml = $@"<?xml version=""1.0"" encoding=""utf-8""?> | ||||||
<RunSettings> | ||||||
<RunConfiguration> | ||||||
<TargetFrameworkVersion>{FrameworkArgValue}</TargetFrameworkVersion> | ||||||
</RunConfiguration> | ||||||
</RunSettings>"; | ||||||
return GetRunSettingsWithTargetFramework(FrameworkArgValue); | ||||||
} | ||||||
|
||||||
/// <summary> | ||||||
/// Almost empty runsettings, just specifying the given target framework. | ||||||
/// Use the overload without any parameters to get the target framework from the currently set test environment. | ||||||
/// </summary> | ||||||
/// <returns></returns> | ||||||
public string GetRunSettingsWithTargetFramework(string targetFramework) | ||||||
{ | ||||||
string runSettingsXml = | ||||||
$@"<?xml version=""1.0"" encoding=""utf-8""?> | ||||||
<RunSettings> | ||||||
<RunConfiguration> | ||||||
<TargetFrameworkVersion>{targetFramework}</TargetFrameworkVersion> | ||||||
</RunConfiguration> | ||||||
</RunSettings>"; | ||||||
|
||||||
return runSettingsXml; | ||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This throws debug assert if the ErrorMessage is null. Super if this breaks in your tests.