Test fixes for tools deps.json generation

This commit is contained in:
Daniel Plaisted 2017-04-21 16:14:44 -07:00
parent fa51bb43fc
commit 5c679cd32e
4 changed files with 36 additions and 4 deletions

View file

@ -281,7 +281,8 @@ namespace Microsoft.DotNet.Tests
lockFile,
s_toolPackageFramework,
depsJsonFile,
new SingleProjectInfo("dotnet-portable", "1.0.0", Enumerable.Empty<ResourceAssemblyInfo>()));
new SingleProjectInfo("dotnet-portable", "1.0.0", Enumerable.Empty<ResourceAssemblyInfo>()),
GetToolDepsJsonGeneratorProject());
File.ReadAllText(depsJsonFile).Should().Be("temp");
File.Delete(depsJsonFile);
@ -456,5 +457,12 @@ namespace Microsoft.DotNet.Tests
return projectToolsCommandResolver;
}
private string GetToolDepsJsonGeneratorProject()
{
// When using the product, the ToolDepsJsonGeneratorProject property is used to get this path, but for testing
// we'll hard code the path inside the SDK since we don't have a project to evaluate here
return Path.Combine(new RepoDirectoriesProvider().Stage2Sdk, @"Sdks\Microsoft.NET.Sdk\build\GenerateDeps\GenerateDeps.proj");
}
}
}