Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@ -43,6 +43,13 @@ namespace ILLink.Tests
/// </summary>
public string Configuration { get; private set; }
/// <summary>
/// The root testbin directory. Used to install test
/// assets that don't depend on the configuration or
/// target framework.
/// </summary>
public string TestBin { get; private set; }
/// <summary>
/// This is the context from which tests will be run in the
/// linker repo. The local directory that contains the
@ -54,7 +61,10 @@ namespace ILLink.Tests
public static TestContext CreateDefaultContext()
{
var packageName = "ILLink.Tasks";
var packageSource = "../../../../bin/nupkgs";
// test is run from corebuild/testbin/<config>/<tfm>
var corebuild = "../../../";
var testBin = Path.Combine(corebuild, "testbin");
var packageSource = Path.Combine(corebuild, "integration", "bin", "nupkgs");
var tasksPackages = Directory.GetFiles(packageSource)
.Where(p => Path.GetExtension(p) == ".nupkg")
.Select(p => Path.GetFileNameWithoutExtension(p))
@ -67,7 +77,7 @@ namespace ILLink.Tests
}
var tasksPackage = tasksPackages.Single();
var version = tasksPackage.Remove(0, packageName.Length + 1);
var dotnetDir = "../../../../../../corebuild/Tools/dotnetcli";
var dotnetDir = Path.Combine(corebuild, "Tools", "dotnetcli");
var dotnetToolNames = Directory.GetFiles(dotnetDir)
.Select(p => Path.GetFileName(p))
.Where(p => p.Contains("dotnet"));
@ -96,6 +106,7 @@ namespace ILLink.Tests
// We want to build and link integration projects in the
// release configuration.
context.Configuration = "Release";
context.TestBin = testBin;
return context;
}
}