General formatting and cleanup. Removed GivenThatWeWantToRunCrossgen from SdkTests as it hasn't existed in years...?

This commit is contained in:
Michael Yanni 2024-02-05 16:27:06 -08:00
parent 0ac3fc7f63
commit 23d9262638
7 changed files with 11 additions and 20 deletions

View file

@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<DefineConstants Condition="'$(IslinuxPortable)' == 'true'">$(DefineConstants);LINUX_PORTABLE</DefineConstants>
@ -23,4 +24,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View file

@ -79,7 +79,6 @@ namespace EndToEnd
project.Save(projectPath);
return testInstance;
}
}
}

View file

@ -195,7 +195,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
AppContext.BaseDirectory;
#endif
private void ResolveCommand(ref string executable, ref string args)
{
if (executable.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))

View file

@ -4,6 +4,7 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using FluentAssertions;
@ -12,7 +13,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public class RepoDirectoriesProvider
{
public readonly static string RepoRoot;
public readonly static string TestWorkingFolder;
public readonly static string DotnetUnderTest;
public readonly static string DotnetRidUnderTest;
@ -55,20 +55,17 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
}
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);
}
}
string AspNetCoreDir = Path.Combine(
Path.GetDirectoryName(DotnetUnderTest),
"shared",
"Microsoft.AspNetCore.App");
string AspNetCoreDir = Path.Combine(Path.GetDirectoryName(DotnetUnderTest), "shared", "Microsoft.AspNetCore.App");
if (Directory.Exists(AspNetCoreDir))
{
Stage2AspNetCore =
Directory.EnumerateDirectories(AspNetCoreDir).First();
Stage2AspNetCore = Directory.EnumerateDirectories(AspNetCoreDir).First();
}
// 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);
DotnetRidUnderTest = lines[2].Trim();
}
}
}

View file

@ -51,10 +51,7 @@ namespace Microsoft.DotNet.TestFramework
{
var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name));
return new TestAssetInfo(
assetDirectory,
name,
this);
return new TestAssetInfo(assetDirectory, name, this);
}
public DirectoryInfo CreateTestDirectory(string testProjectName = "", [CallerMemberName] string callingMethod = "", string identifier = "")

View file

@ -11,7 +11,6 @@ using Microsoft.DotNet.TestFramework;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
/// <summary>
/// Base class for all unit test classes.
/// </summary>

View file

@ -37,7 +37,6 @@
<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.GivenThatWeWantToPublishAWebApp" />
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunCrossgen" />
<Class Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink" />
<Class Name="Microsoft.NET.Publish.Tests.PublishWebApp" />
<Class Name="Microsoft.NET.Publish.Tests.PublishWpfApp" />