Merge branch 'rel/1.0.0' of https://github.com/dotnet/cli into test-fx

Conflicts:
	Microsoft.DotNet.Cli.sln
	scripts/dockerbuild.sh
	scripts/test/setup/build-test-prerequisites.ps1
	test/dotnet-build.Tests/IncrementalTestBase.cs
	test/dotnet-publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
	test/dotnet-publish.Tests/project.json
This commit is contained in:
Sridhar Periyasamy 2016-02-12 17:26:58 -08:00
commit 2a94a1e384
184 changed files with 5025 additions and 3052 deletions

View file

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FluentAssertions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
@ -14,7 +15,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
{
public class ProjectToProjectDependenciesIncrementalTest : IncrementalTestBase
{
private string[] _projects = new[] { "L0", "L11", "L12", "L21", "L22" };
private readonly string[] _projects = new[] { "L0", "L11", "L12", "L21", "L22" };
private string MainProjectExe
{
@ -58,6 +59,38 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
AssertRebuilt(result3, expectedRebuiltProjects);
}
[Fact]
public void TestNoDependencyFlag()
{
var dependencies = new[] { "L11", "L12", "L21", "L22" };
// first clean build; all projects required compilation
var result1 = BuildProject();
AssertRebuilt(result1, _projects);
// modify the source code of a leaf dependency
TouchSourcesOfProject("L22");
// second build with no dependencies and no incremental; only the root rebuilds
var result2 = BuildProject(noDependencies: true, noIncremental: true);
result2.Should().StdOutMatchPattern("Compiling.*L0.*");
AssertResultDoesNotContainStrings(result2, dependencies);
// third build with no dependencies but incremental; nothing rebuilds
var result3 = BuildProject(noDependencies: true);
result3.Should().HaveSkippedProjectCompilation("L0");
AssertResultDoesNotContainStrings(result3, dependencies);
}
private static void AssertResultDoesNotContainStrings(CommandResult commandResult, string[] strings)
{
foreach (var s in strings)
{
commandResult.StdOut.Should().NotContain(s);
}
}
// compute A - B
private T[] SetDifference<T>(T[] A, T[] B)
{