Work around ZipArchive bug in tests

See https://github.com/dotnet/corefx/issues/15516, 'dotnet' executable doesn't get its execute flag set in netcoreapp2.0.
This commit is contained in:
Eric Erhardt 2017-01-26 12:17:21 -06:00
parent eefdbb8846
commit fafc2eedae

View file

@ -3,6 +3,8 @@
using System;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
using FluentAssertions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.PlatformAbstractions;
@ -70,6 +72,12 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
.GetDirectory("bin", configuration, "netcoreapp1.0", rid, "publish", $"{testAppName}{Constants.ExeSuffix}")
.FullName;
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
//Workaround for https://github.com/dotnet/corefx/issues/15516
Process.Start("chmod", $"u+x {outputProgram}").WaitForExit();
}
new TestCommand(outputProgram)
.ExecuteWithCapturedOutput()
.Should().Pass()