Add support for building Windows x86 version of dotnet CLI

- Changes to build scripts to produce Winx86 build artifacts like
  zip/installer.
- Change to run Nuget-xplat in the same process as dotnet.exe instead of
  spinning up a new 'corerun' process.
This commit is contained in:
Sridhar Periyasamy 2016-02-23 18:04:49 -08:00
parent 2aedd677c6
commit 834edfbc9c
11 changed files with 89 additions and 44 deletions

View file

@ -89,6 +89,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
return;
}
if (IsWinX86())
{
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
return;
}
var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true, framework: DefaultFramework);
buildCommand.Execute().Should().Pass();
@ -105,6 +111,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
return;
}
if (IsWinX86())
{
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
return;
}
var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true, nativeCppMode: true, framework: DefaultFramework);
buildCommand.Execute().Should().Pass();
@ -121,6 +133,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
return;
}
if (IsWinX86())
{
Console.WriteLine("Skipping native compilation tests on Windows x86 - https://github.com/dotnet/cli/issues/1550");
return;
}
// first build
var buildCommand = new BuildCommand(TestProject, output: OutputDirectory, native: true, nativeCppMode: true, framework: DefaultFramework);
var binariesOutputDirectory = GetCompilationOutputPath(OutputDirectory, false);
@ -233,6 +251,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
return false;
}
private bool IsWinX86()
{
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
RuntimeInformation.ProcessArchitecture == Architecture.X86;
}
private static DateTime GetLastWriteTimeUtcOfDirectoryFiles(string outputDirectory)
{
return Directory.EnumerateFiles(outputDirectory).Max(f => File.GetLastWriteTimeUtc(f));