Skip to content

Commit

Permalink
Fix for discovery not working on Mac machines (#2266)
Browse files Browse the repository at this point in the history
* Fix for discovery not working on Mac machines

* Adding test assert
  • Loading branch information
vagisha-nidhi authored Dec 11, 2019
1 parent 3a92a40 commit 6d87e50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ public virtual TestProcessStartInfo GetTestHostProcessStartInfo(
{
var currentProcessPath = this.processHelper.GetCurrentProcessFileName();

if (string.IsNullOrEmpty(testHostPath))
{
testHostPath = this.GetTestHostPath(runtimeConfigDevPath, depsFilePath, sourceDirectory);
}

// This host manager can create process start info for dotnet core targets only.
// If already running with the dotnet executable, use it; otherwise pick up the dotnet available on path.
// Wrap the paths with quotes in case dotnet executable is installed on a path with whitespace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void GetTestHostProcessStartInfoShouldUseTestHostX86ExePresentOnWindows()
}

[TestMethod]
public void GetTestHostProcessStartInfoShouldUseDotnetExeOnUnix()
public void GetTestHostProcessStartInfoShouldUseDotnetExeOnUnixWithTestHostDllPath()
{
this.mockFileHelper.Setup(ph => ph.Exists("testhost.x86.exe")).Returns(true);
this.mockFileHelper.Setup(ph => ph.Exists("testhost.dll")).Returns(true);
Expand All @@ -262,6 +262,7 @@ public void GetTestHostProcessStartInfoShouldUseDotnetExeOnUnix()
var startInfo = this.GetDefaultStartInfo();

StringAssert.Contains(startInfo.FileName, "dotnet");
StringAssert.Contains(startInfo.Arguments, "testhost.dll");
}

[TestMethod]
Expand Down

0 comments on commit 6d87e50

Please sign in to comment.