Merge pull request #1551 from Sridhar-MS/cli-x86-support

Add support for building Windows x86 version of dotnet CLI
This commit is contained in:
Sridhar Periyasamy 2016-02-29 14:59:51 -08:00
commit de89da6a3a
14 changed files with 89 additions and 57 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));