This commit is contained in:
Ryan Nowak 2018-01-12 15:17:16 -08:00
parent f025a27f04
commit 2555c5bab1
2 changed files with 16 additions and 5 deletions

View File

@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
continue; continue;
} }
if (location != null && match.Groups["location"].Value != location) if (location != null && match.Groups["location"].Value.Trim() != location)
{ {
continue; continue;
} }
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
} }
} }
throw new BuildErrorMissingException(result, errorCode); throw new BuildErrorMissingException(result, errorCode, location);
} }
public static void BuildFailed(MSBuildResult result) public static void BuildFailed(MSBuildResult result)
@ -248,15 +248,26 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
private class BuildErrorMissingException : MSBuildXunitException private class BuildErrorMissingException : MSBuildXunitException
{ {
public BuildErrorMissingException(MSBuildResult result, string errorCode) public BuildErrorMissingException(MSBuildResult result, string errorCode, string location)
: base(result) : base(result)
{ {
ErrorCode = errorCode; ErrorCode = errorCode;
Location = location;
} }
public string ErrorCode { get; } public string ErrorCode { get; }
protected override string Heading => $"Error code '{ErrorCode}' was not found."; public string Location { get; }
protected override string Heading
{
get
{
return
$"Error code '{ErrorCode}' was not found." + Environment.NewLine +
$"Looking for '{Location ?? ".*"}: error {ErrorCode}: .*'";
}
}
} }

View File

@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
TimeSpan? timeout = null, TimeSpan? timeout = null,
MSBuildProcessKind msBuildProcessKind = MSBuildProcessKind.Dotnet) MSBuildProcessKind msBuildProcessKind = MSBuildProcessKind.Dotnet)
{ {
timeout = timeout ?? TimeSpan.FromSeconds(30); timeout = timeout ?? TimeSpan.FromSeconds(60);
var processStartInfo = new ProcessStartInfo() var processStartInfo = new ProcessStartInfo()
{ {