Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build/pack.cake
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,18 @@ Task("Test")
CoverletOutputName = $"{projectName}.coverage.xml"
};

var filters = new List<string>();

if (IsRunningOnUnix())
{
settings.Filter = "TestCategory!=NoMono";
filters.Add("TestCategory!=NoUnix");
if (string.Equals(framework, parameters.FullFxVersion))
filters.Add("TestCategory!=NoMono");
}

if (filters.Any())
settings.Filter = string.Join(" & ", filters);

DotNetCoreTest(project.FullPath, settings, coverletSettings);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/AssemblyInfoFileUpdaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public void ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile
[TestCase("cs", "[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n// comment\r\n")]
[TestCase("fs", "[<assembly: AssemblyVersion(\"1.0.0.0\")>]\r\n[<assembly: AssemblyFileVersion(\"1.0.0.0\")>]\r\ndo\r\n()\r\n")]
[TestCase("vb", "<Assembly: AssemblyVersion(\"1.0.0.0\")>\r\n<Assembly: AssemblyFileVersion(\"1.0.0.0\")>\r\n' comment\r\n")]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
public void Issue1183_ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes(string fileExtension, string assemblyFileContent)
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/ConfigProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public void NoWarnOnGitVersionYmlFile()
{
ConfigurationProvider.Provide(repoPath, fileSystem, configFileLocator);
}
s.Length.ShouldBe(0);
s.ShouldBeEmpty();
}

string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/DefaultConfigFileLocatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void NoWarnOnGitVersionYmlFile()
{
ConfigurationProvider.Provide(repoPath, fileSystem, configFileLocator);
}
s.Length.ShouldBe(0);
s.ShouldBeEmpty();
}

string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/Init/InitScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void Setup()
}

[Test]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
public void CanSetNextVersion()
{
Expand Down
6 changes: 3 additions & 3 deletions src/GitVersionCore.Tests/LoggerTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using NUnit.Framework;
using NUnit.Framework;
using System;
using GitVersion;
using Shouldly;
Expand All @@ -20,7 +20,7 @@ public void LoggerObscuresPassword(string protocol)
using (Logger.AddLoggersTemporarily(action, action, action, action))
Logger.WriteInfo($"{protocol}://{username}:{password}@workspace.visualstudio.com/DefaultCollection/_git/CAS");

s.Contains(password).ShouldBe(false);
s.ShouldNotContain(password);
}

[Test]
Expand All @@ -32,7 +32,7 @@ public void UsernameWithoutPassword()
using (Logger.AddLoggersTemporarily(action, action, action, action))
Logger.WriteInfo(repoUrl);

s.Contains(repoUrl).ShouldBe(true);
s.ShouldContain(repoUrl);
}
}
}
4 changes: 2 additions & 2 deletions src/GitVersionCore.Tests/NamedConfigFileLocatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void NoWarnOnCustomYmlFile()
{
ConfigurationProvider.Provide(repoPath, fileSystem, configFileLocator);
}
s.Length.ShouldBe(0);
s.ShouldBeEmpty();
}

[Test]
Expand All @@ -65,7 +65,7 @@ public void NoWarnOnCustomYmlFileOutsideRepoPath()
{
ConfigurationProvider.Provide(repoPath, fileSystem, configFileLocator);
}
s.Length.ShouldBe(0);
s.ShouldBeEmpty();
}

string SetupConfigFileContent(string text, string fileName = null, string path = null)
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionExe.Tests/ExecCmdLineArgumentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void WorkingDirectoryWithoutGitFolderCrashesWithInformativeMessage()
}

[Test]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Doesn't work on Mono/Unix because of the path heuristics that needs to be done there in order to figure out whether the first argument actually is a path.")]
public void WorkingDirectoryDoesNotExistCrashesWithInformativeMessage()
{
Expand Down
6 changes: 3 additions & 3 deletions src/GitVersionExe.Tests/UpdateWixVersionFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void Setup()
}

[Test]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Doesn't work on Mono/Unix because of the path heuristics that needs to be done there in order to figure out whether the first argument actually is a path.")]
public void WixVersionFileCreationTest()
{
Expand All @@ -37,7 +37,7 @@ public void WixVersionFileCreationTest()
}

[Test]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Doesn't work on Mono/Unix because of the path heuristics that needs to be done there in order to figure out whether the first argument actually is a path.")]
public void WixVersionFileVarCountTest()
{
Expand All @@ -60,7 +60,7 @@ public void WixVersionFileVarCountTest()
}

[Test]
[Category("NoMono")]
[Category("NoUnix")]
[Description("Doesn't work on Mono/Unix because of the path heuristics that needs to be done there in order to figure out whether the first argument actually is a path.")]
public void WixVersionFileContentTest()
{
Expand Down