-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build breaks and move test classes into their own files
- Loading branch information
Showing
16 changed files
with
1,044 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
test/Nerdbank.GitVersioning.Tests/BuildIntegrationDisabledTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using Nerdbank.GitVersioning; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
[Trait("Engine", EngineString)] | ||
[Collection("Build")] // msbuild sets current directory in the process, so we can't have it be concurrent with other build tests. | ||
public class BuildIntegrationDisabledTests : BuildIntegrationTests | ||
{ | ||
private const string EngineString = "Disabled"; | ||
|
||
public BuildIntegrationDisabledTests(ITestOutputHelper logger) | ||
: base(logger) | ||
{ | ||
} | ||
|
||
protected override GitContext CreateGitContext(string path, string committish = null) | ||
=> GitContext.Create(path, committish, GitContext.Engine.Disabled); | ||
|
||
protected override void ApplyGlobalProperties(IDictionary<string, string> globalProperties) | ||
=> globalProperties["NBGV_GitEngine"] = EngineString; | ||
} |
24 changes: 24 additions & 0 deletions
24
test/Nerdbank.GitVersioning.Tests/BuildIntegrationLibGit2Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using Nerdbank.GitVersioning; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
[Trait("Engine", EngineString)] | ||
[Collection("Build")] // msbuild sets current directory in the process, so we can't have it be concurrent with other build tests. | ||
public class BuildIntegrationLibGit2Tests : SomeGitBuildIntegrationTests | ||
{ | ||
private const string EngineString = "LibGit2"; | ||
|
||
public BuildIntegrationLibGit2Tests(ITestOutputHelper logger) | ||
: base(logger) | ||
{ | ||
} | ||
|
||
protected override GitContext CreateGitContext(string path, string committish = null) | ||
=> GitContext.Create(path, committish, GitContext.Engine.ReadWrite); | ||
|
||
protected override void ApplyGlobalProperties(IDictionary<string, string> globalProperties) | ||
=> globalProperties["NBGV_GitEngine"] = EngineString; | ||
} |
24 changes: 24 additions & 0 deletions
24
test/Nerdbank.GitVersioning.Tests/BuildIntegrationManagedTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using Nerdbank.GitVersioning; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
[Trait("Engine", EngineString)] | ||
[Collection("Build")] // msbuild sets current directory in the process, so we can't have it be concurrent with other build tests. | ||
public class BuildIntegrationManagedTests : SomeGitBuildIntegrationTests | ||
{ | ||
private const string EngineString = "Managed"; | ||
|
||
public BuildIntegrationManagedTests(ITestOutputHelper logger) | ||
: base(logger) | ||
{ | ||
} | ||
|
||
protected override GitContext CreateGitContext(string path, string committish = null) | ||
=> GitContext.Create(path, committish, GitContext.Engine.ReadOnly); | ||
|
||
protected override void ApplyGlobalProperties(IDictionary<string, string> globalProperties) | ||
=> globalProperties["NBGV_GitEngine"] = EngineString; | ||
} |
Oops, something went wrong.