Skip to content
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

Multitarget testhost #2493

Merged
merged 8 commits into from
Jul 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix net451 path
  • Loading branch information
nohwnd committed Jul 28, 2020
commit 1b5b143500eab5bd10a247d14b2c613105af931a
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,12 @@ public virtual TestProcessStartInfo GetTestHostProcessStartInfo(
TestRunnerConnectionInfo connectionInfo)
{
var targetFrameworkMoniker = this.targetFramework.Name.Replace(".NETFramework,Version=v", string.Empty).Replace(".", string.Empty);
if (targetFrameworkMoniker == "451")
{
// This is the default host, it does not need any suffix.
targetFrameworkMoniker = string.Empty;
}

// Default host is net451 and is named testhost.exe it does not need any suffix.
var targetFrameworkSuffix = targetFrameworkMoniker == "451" ? string.Empty : $".net{targetFrameworkMoniker}";

// Default test host manager supports shared test sources
var testHostProcessName = string.Format(this.architecture == Architecture.X86 ? X86TestHostProcessName : X64TestHostProcessName, $".net{targetFrameworkMoniker}");
var testHostProcessName = string.Format(this.architecture == Architecture.X86 ? X86TestHostProcessName : X64TestHostProcessName, targetFrameworkSuffix);
var currentWorkingDirectory = Path.Combine(Path.GetDirectoryName(typeof(DefaultTestHostManager).GetTypeInfo().Assembly.Location), "..//");
var argumentsString = " " + connectionInfo.ToCommandLineOptions();

Expand Down