Fix --no-dependencies incremental check regression
This commit is contained in:
parent
563f6497fd
commit
9ffa4ad399
5 changed files with 50 additions and 8 deletions
|
@ -68,7 +68,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
|
|||
.WithBuildArtifacts();
|
||||
|
||||
TestProjectRoot = testInstance.TestRoot;
|
||||
|
||||
|
||||
var dependencies = new[] { "L11", "L12", "L21", "L22" };
|
||||
|
||||
// modify the source code of a leaf dependency
|
||||
|
@ -86,6 +86,27 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
|
|||
AssertResultDoesNotContainStrings(result3, dependencies);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestNoDependenciesDependencyRebuild()
|
||||
{
|
||||
var testInstance = TestAssetsManager.CreateTestInstance("TestProjectToProjectDependencies")
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
|
||||
TestProjectRoot = testInstance.TestRoot;
|
||||
|
||||
// modify the source code of a leaf dependency
|
||||
TouchSourcesOfProject("L11");
|
||||
|
||||
// second build with no dependencies, rebuilding leaf
|
||||
var result2 = new BuildCommand(GetProjectDirectory("L11"), noDependencies: true, framework: DefaultLibraryFramework).ExecuteWithCapturedOutput();
|
||||
result2.Should().HaveStdOutMatching("Compiling.*L11.*");
|
||||
|
||||
// third build with no dependencies but incremental; root project should rebuild
|
||||
var result3 = BuildProject(noDependencies: true);
|
||||
result3.Should().HaveCompiledProject("L0", _appFrameworkFullName);
|
||||
}
|
||||
|
||||
private static void AssertResultDoesNotContainStrings(CommandResult commandResult, string[] strings)
|
||||
{
|
||||
foreach (var s in strings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue