diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs index c6ae4da25a..983e7ea629 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; +using System.Runtime.InteropServices; using System.Threading.Tasks; using Xunit; @@ -21,17 +22,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileExists(result, OutputPath, "ClassLibrary.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll"); - Assert.NuspecContains( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), - $""); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + // Travis on OSX produces different full paths in C# and MSBuild + Assert.NuspecContains( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), + $""); - Assert.NuspecDoesNotContain( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), - $""); + Assert.NuspecDoesNotContain( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), + $""); + } Assert.NuspecDoesNotContain( result, @@ -52,17 +57,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - Assert.NuspecContains( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), - $""); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + // Travis on OSX produces different full paths in C# and MSBuild + Assert.NuspecContains( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), + $""); - Assert.NuspecContains( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), - $""); + Assert.NuspecContains( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), + $""); + } Assert.NupkgContains( result, @@ -83,16 +92,20 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileExists(result, OutputPath, "ClassLibrary.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll"); - Assert.NuspecContains( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), - $""); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + // Travis on OSX produces different full paths in C# and MSBuild + Assert.NuspecContains( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), + $""); - Assert.NuspecContains( - result, - Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), - @""); + Assert.NuspecContains( + result, + Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), + @""); + } Assert.NupkgContains( result,