-
Notifications
You must be signed in to change notification settings - Fork 339
Enable Fakes Datacollector settings to be added in design mode #2586
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
Changes from 3 commits
8d8f462
4ba7481
09d2cb6
5fbce49
e90b576
be9c610
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,21 +3,12 @@ | |
|
|
||
| namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers | ||
| { | ||
| using System; | ||
| using System.Xml; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Xml.XPath; | ||
| using System.Threading; | ||
| using System.Reflection; | ||
| using System.Globalization; | ||
| using System.Threading.Tasks; | ||
| using System.Collections.Generic; | ||
| using Microsoft.VisualStudio.TestPlatform.Client; | ||
| using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLine.Internal; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.Utilities; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLine.Publisher; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLine.Resources; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLineUtilities; | ||
| using Microsoft.VisualStudio.TestPlatform.Common; | ||
| using Microsoft.VisualStudio.TestPlatform.Common.Interfaces; | ||
|
|
@@ -34,7 +25,15 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers | |
| using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions; | ||
| using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces; | ||
| using Microsoft.VisualStudio.TestPlatform.Utilities; | ||
| using Microsoft.VisualStudio.TestPlatform.CommandLine.Resources; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Reflection; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using System.Xml; | ||
| using System.Xml.XPath; | ||
|
|
||
| /// <summary> | ||
| /// Defines the TestRequestManger which can fire off discovery and test run requests | ||
|
|
@@ -267,11 +266,19 @@ public void RunTests(TestRunRequestPayload testRunRequestPayload, ITestHostLaunc | |
| this.LogTelemetryForLegacySettings(requestData, runsettings); | ||
| } | ||
|
|
||
| if (!commandLineOptions.IsDesignMode) | ||
| // get Fakes data collector settings | ||
| if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("_Disable_Fakes_DataCollector_Configuration"))) | ||
|
||
| { | ||
| // Generate fakes settings only for command line scenarios. In case of | ||
| // Editors/IDEs, this responsibility is with the caller. | ||
| GenerateFakesUtilities.GenerateFakesSettings(this.commandLineOptions, this.commandLineOptions.Sources.ToList(), ref runsettings); | ||
| // The commandline Options do not have sources in design time mode, | ||
| // and so we fall back to using sources instead | ||
| if (this.commandLineOptions.Sources.Any()) | ||
| { | ||
| GenerateFakesUtilities.GenerateFakesSettings(this.commandLineOptions, this.commandLineOptions.Sources.ToList(), ref runsettings); | ||
| } | ||
| else if (sources.Any()) | ||
| { | ||
| GenerateFakesUtilities.GenerateFakesSettings(this.commandLineOptions, sources, ref runsettings); | ||
| } | ||
| } | ||
|
|
||
| if (testRunRequestPayload.Sources != null && testRunRequestPayload.Sources.Any()) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.