Fix build break

This commit is contained in:
Pranav K 2018-03-02 09:38:40 -08:00
parent 5bd650bdd1
commit 29bd5f49dd
1 changed files with 42 additions and 29 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO; using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using Xunit; using Xunit;
@ -21,6 +22,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileExists(result, OutputPath, "ClassLibrary.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.dll");
Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll");
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Travis on OSX produces different full paths in C# and MSBuild
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@ -32,6 +36,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
}
Assert.NuspecDoesNotContain( Assert.NuspecDoesNotContain(
result, result,
@ -52,6 +57,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.BuildPassed(result); Assert.BuildPassed(result);
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Travis on OSX produces different full paths in C# and MSBuild
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
@ -63,6 +71,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netstandard2.0", "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", "netstandard2.0", "ClassLibrary.Views.pdb")}\" />");
}
Assert.NupkgContains( Assert.NupkgContains(
result, result,
@ -83,6 +92,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileExists(result, OutputPath, "ClassLibrary.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.dll");
Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll");
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Travis on OSX produces different full paths in C# and MSBuild
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@ -93,6 +105,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netstandard2.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); @"<files include=""any/netstandard2.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
}
Assert.NupkgContains( Assert.NupkgContains(
result, result,