Merge branch 'rel/1.0.0' into piotrpMSFT/merge/rc3toRTM

This commit is contained in:
Piotr Puszkiewicz 2017-01-11 17:15:44 -08:00 committed by GitHub
commit 0f9888c11d
3 changed files with 25 additions and 2 deletions

View file

@ -89,6 +89,8 @@ namespace Microsoft.DotNet.Tools.Build
msbuildArgs.Add($"/verbosity:{verbosityOption.Value()}");
}
msbuildArgs.Add($"/clp:Summary");
msbuildArgs.AddRange(app.RemainingArguments);
return new MSBuildForwardingApp(msbuildArgs).Execute();

View file

@ -72,5 +72,25 @@ namespace Microsoft.DotNet.Cli.Build.Tests
.Should().Pass()
.And.HaveStdOutContaining("Hello World");
}
[Fact]
public void ItPrintsBuildSummary()
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssets.Get(testAppName)
.CreateInstance(testAppName)
.WithSourceFiles()
.WithRestoreFiles();
string expectedBuildSummary = @"Build succeeded.
0 Warning(s)
0 Error(s)";
var cmd = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.ExecuteWithCapturedOutput();
cmd.Should().Pass();
cmd.StdOut.Should().ContainVisuallySameFragment(expectedBuildSummary);
}
}
}

View file

@ -7,6 +7,7 @@ using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Xunit;
namespace Microsoft.DotNet.Migration.Tests
@ -37,11 +38,11 @@ namespace Microsoft.DotNet.Migration.Tests
"PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj");
}
private void MigrateAndBuild(string groupName, string projectName)
private void MigrateAndBuild(string groupName, string projectName, [CallerMemberName] string callingMethod = "", string identifier = "")
{
var projectDirectory = TestAssets
.Get(groupName, projectName)
.CreateInstance()
.CreateInstance(callingMethod: callingMethod, identifier: identifier)
.WithSourceFiles()
.Root;