Use a shorter path for test working directories, get rid of Stage 0 project.json based CLI
This commit is contained in:
parent
fd66cdcc2f
commit
4c3b13e4a8
8 changed files with 32 additions and 313 deletions
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string _stage2Sdk;
|
||||
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||
private string _testPackages;
|
||||
private string _pjDotnet;
|
||||
private string _testWorkingFolder;
|
||||
|
||||
public static string RepoRoot
|
||||
{
|
||||
|
@ -86,26 +86,27 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
public string Artifacts => _artifacts;
|
||||
public string BuiltDotnet => _builtDotnet;
|
||||
public string NugetPackages => _nugetPackages;
|
||||
public string PjDotnet => _pjDotnet;
|
||||
public string Stage2Sdk => _stage2Sdk;
|
||||
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||
public string TestPackages => _testPackages;
|
||||
public string TestWorkingFolder => _testWorkingFolder;
|
||||
|
||||
public RepoDirectoriesProvider(
|
||||
string artifacts = null,
|
||||
string builtDotnet = null,
|
||||
string nugetPackages = null,
|
||||
string corehostPackages = null,
|
||||
string corehostDummyPackages = null,
|
||||
string pjDotnet = null)
|
||||
string corehostDummyPackages = null)
|
||||
{
|
||||
// Ideally this wouldn't be hardcoded, so that you could use stage n to build stage n + 1, and then use stage n + 1 to run tests
|
||||
int previousStage = 2;
|
||||
|
||||
_artifacts = artifacts ?? Path.Combine(RepoRoot,
|
||||
"out",
|
||||
"2", // Stage - ideally this would come from the "previous stage"
|
||||
previousStage.ToString(),
|
||||
BuildRid);
|
||||
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
|
||||
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
|
||||
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
|
||||
_stage2Sdk = Directory
|
||||
.EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk"))
|
||||
.First(d => !d.Contains("NuGetFallbackFolder"));
|
||||
|
@ -118,14 +119,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
{
|
||||
throw new InvalidOperationException("TEST_PACKAGES environment variable not set");
|
||||
}
|
||||
}
|
||||
|
||||
private string GetPjDotnetPath()
|
||||
{
|
||||
return new DirectoryInfo(Path.Combine(RepoRoot, ".dotnet_stage0PJ"))
|
||||
.GetDirectories().First()
|
||||
.GetFiles("dotnet*").First()
|
||||
.FullName;
|
||||
_testWorkingFolder = Path.Combine(RepoRoot,
|
||||
"out",
|
||||
(previousStage + 1).ToString(),
|
||||
BuildRid,
|
||||
"test");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue