General formatting and cleanup. Removed GivenThatWeWantToRunCrossgen from SdkTests as it hasn't existed in years...?
This commit is contained in:
parent
0ac3fc7f63
commit
23d9262638
7 changed files with 11 additions and 20 deletions
|
@ -1,4 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
|
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
|
||||||
<DefineConstants Condition="'$(IslinuxPortable)' == 'true'">$(DefineConstants);LINUX_PORTABLE</DefineConstants>
|
<DefineConstants Condition="'$(IslinuxPortable)' == 'true'">$(DefineConstants);LINUX_PORTABLE</DefineConstants>
|
||||||
|
@ -23,4 +24,5 @@
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -79,7 +79,6 @@ namespace EndToEnd
|
||||||
project.Save(projectPath);
|
project.Save(projectPath);
|
||||||
|
|
||||||
return testInstance;
|
return testInstance;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
AppContext.BaseDirectory;
|
AppContext.BaseDirectory;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
private void ResolveCommand(ref string executable, ref string args)
|
private void ResolveCommand(ref string executable, ref string args)
|
||||||
{
|
{
|
||||||
if (executable.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
|
if (executable.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
|
||||||
|
@ -12,7 +13,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public class RepoDirectoriesProvider
|
public class RepoDirectoriesProvider
|
||||||
{
|
{
|
||||||
public readonly static string RepoRoot;
|
public readonly static string RepoRoot;
|
||||||
|
|
||||||
public readonly static string TestWorkingFolder;
|
public readonly static string TestWorkingFolder;
|
||||||
public readonly static string DotnetUnderTest;
|
public readonly static string DotnetUnderTest;
|
||||||
public readonly static string DotnetRidUnderTest;
|
public readonly static string DotnetRidUnderTest;
|
||||||
|
@ -55,20 +55,17 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string configuration = new DirectoryInfo(AppContext.BaseDirectory).Parent.Name;
|
// https://stackoverflow.com/a/60545278/294804
|
||||||
|
var assemblyConfigurationAttribute = typeof(RepoDirectoriesProvider).Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>();
|
||||||
|
string configuration = assemblyConfigurationAttribute?.Configuration;
|
||||||
DotnetUnderTest = Path.Combine(RepoRoot, "artifacts", "bin", "redist", configuration, "dotnet", "dotnet" + dotnetExtension);
|
DotnetUnderTest = Path.Combine(RepoRoot, "artifacts", "bin", "redist", configuration, "dotnet", "dotnet" + dotnetExtension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string AspNetCoreDir = Path.Combine(
|
string AspNetCoreDir = Path.Combine(Path.GetDirectoryName(DotnetUnderTest), "shared", "Microsoft.AspNetCore.App");
|
||||||
Path.GetDirectoryName(DotnetUnderTest),
|
|
||||||
"shared",
|
|
||||||
"Microsoft.AspNetCore.App");
|
|
||||||
|
|
||||||
if (Directory.Exists(AspNetCoreDir))
|
if (Directory.Exists(AspNetCoreDir))
|
||||||
{
|
{
|
||||||
Stage2AspNetCore =
|
Stage2AspNetCore = Directory.EnumerateDirectories(AspNetCoreDir).First();
|
||||||
Directory.EnumerateDirectories(AspNetCoreDir).First();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Resolve dotnet folder even if DotnetUnderTest doesn't have full path
|
// TODO: Resolve dotnet folder even if DotnetUnderTest doesn't have full path
|
||||||
|
@ -81,6 +78,5 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
var lines = File.ReadAllLines(versionFile);
|
var lines = File.ReadAllLines(versionFile);
|
||||||
DotnetRidUnderTest = lines[2].Trim();
|
DotnetRidUnderTest = lines[2].Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,10 +51,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
{
|
{
|
||||||
var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name));
|
var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name));
|
||||||
|
|
||||||
return new TestAssetInfo(
|
return new TestAssetInfo(assetDirectory, name, this);
|
||||||
assetDirectory,
|
|
||||||
name,
|
|
||||||
this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DirectoryInfo CreateTestDirectory(string testProjectName = "", [CallerMemberName] string callingMethod = "", string identifier = "")
|
public DirectoryInfo CreateTestDirectory(string testProjectName = "", [CallerMemberName] string callingMethod = "", string identifier = "")
|
||||||
|
|
|
@ -11,7 +11,6 @@ using Microsoft.DotNet.TestFramework;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base class for all unit test classes.
|
/// Base class for all unit test classes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASelfContainedApp.It_can_make_a_Windows_GUI_exe" />
|
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASelfContainedApp.It_can_make_a_Windows_GUI_exe" />
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASingleFileApp" />
|
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASingleFileApp" />
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAWebApp" />
|
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAWebApp" />
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunCrossgen" />
|
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink" />
|
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink" />
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.PublishWebApp" />
|
<Class Name="Microsoft.NET.Publish.Tests.PublishWebApp" />
|
||||||
<Class Name="Microsoft.NET.Publish.Tests.PublishWpfApp" />
|
<Class Name="Microsoft.NET.Publish.Tests.PublishWpfApp" />
|
||||||
|
|
Loading…
Reference in a new issue