Skip to content

Commit

Permalink
Add a category to ignore some tests in the CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
KeRNeLith committed Dec 10, 2019
1 parent bef025e commit 384b30a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
5 changes: 3 additions & 2 deletions QuikGraph.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeAccessorOwnerBody/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<!-- Float comparison -->
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CompareOfFloatsByEqualityOperator/@EntryIndexedValue">SUGGESTION</s:String>
<!-- R# Code Style -->

<!-- R# Code Style -->
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BFS/@EntryIndexedValue">BFS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CI/@EntryIndexedValue">CI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DAG/@EntryIndexedValue">DAG</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DFS/@EntryIndexedValue">DFS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DGML/@EntryIndexedValue">DGML</s:String>
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ after_test:
$coveralls = (Resolve-Path "tools\csmacnz.Coveralls.exe").ToString()
$testAssemblies = (ls tests\*.Tests\bin\$env:Configuration\net45\*Tests.dll | Where-Object { $_ -Match "net*" -and $_ -NotMatch "netcoreapp*" } | % FullName | sort-object -Unique)
& $opencover -register:Path64 -filter:"+[*]* -[*.Test*]*" -excludebyfile:"*\Dgml.cs;*\SortedSet.cs;*\BitHelper.cs" -hideskipped:File -target:"$nunitConsole" -targetargs:"$testAssemblies --where \`"cat != VerboseTest\`"" -log:Warn -output:coverage.xml
& $opencover -register:Path64 -filter:"+[*]* -[*.Test*]*" -excludebyfile:"*\Dgml.cs;*\SortedSet.cs;*\BitHelper.cs" -hideskipped:File -target:"$nunitConsole" -targetargs:"$testAssemblies --where \`"cat != VerboseTest and cat != CISkip\`"" -log:Warn -output:coverage.xml
& $sonarScanner end /d:"sonar.login=$env:SONARQUBE_TOKEN"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public void GetVertexColor_Throws()
[Category(TestCategories.LongRunning)]
public void DagShortestPath()
{
foreach (AdjacencyGraph<string, Edge<string>> graph in TestGraphFactory.GetAdjacencyGraphs_SlowTests(10))
foreach (AdjacencyGraph<string, Edge<string>> graph in TestGraphFactory.GetAdjacencyGraphs_SlowTests(50))
{
DagShortestPath_Test(graph);
DagCriticalPath_Test(graph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ void AddEdge(char source, char target, double weight)
}

[Test]
[Category(TestCategories.CISkip)]
public void DijkstraRepro12359()
{
AdjacencyGraph<string, Edge<string>> graph = TestGraphFactory.LoadGraph(GetGraphFilePath("repro12359.graphml"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace QuikGraph.Tests.Algorithms.ShortestPath
/// Tests for comparing <see cref="FloydWarshallAllShortestPathAlgorithm{TVertex,TEdge}"/> and other shortest path finder algorithms.
/// </summary>
[TestFixture]
[Category(TestCategories.CISkip)]
internal class FloydCompareTests : FloydWarshallTestsBase
{
#region Test helpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void GetVertexColor_Throws()
[Category(TestCategories.LongRunning)]
public void UndirectedDijkstra()
{
foreach (UndirectedGraph<string, Edge<string>> graph in TestGraphFactory.GetUndirectedGraphs_SlowTests())
foreach (UndirectedGraph<string, Edge<string>> graph in TestGraphFactory.GetUndirectedGraphs_SlowTests(20))
{
int cut = 0;
foreach (string root in graph.Vertices)
Expand Down
6 changes: 6 additions & 0 deletions tests/QuikGraph.Tests/Common/TestCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ public static class TestCategories
[NotNull]
public const string LongRunning = "LongRunning";

/// <summary>
/// Unit tests skipped by the CI.
/// </summary>
[NotNull]
public const string CISkip = "CISkip";

/// <summary>
/// Verbose unit tests (not really relevant to test a feature).
/// </summary>
Expand Down

0 comments on commit 384b30a

Please sign in to comment.