Skip platform tests in CI
This commit is contained in:
parent
fb03771bb7
commit
2b72eabdf9
|
@ -5,6 +5,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="../MainSlnCommon.props" />
|
<Import Project="../MainSlnCommon.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<DefineConstants Condition=" '$(GITLAB_CI)' != '' Or '$(APPVEYOR)' != '' ">$(DefineConstants);SKIP_PLATFORM_TESTS</DefineConstants>
|
||||||
<OutputPath>$(ProjectDir)../../test_output</OutputPath>
|
<OutputPath>$(ProjectDir)../../test_output</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -13,6 +13,8 @@ namespace BizHawk.Tests.Common.PathExtensions
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestNullability()
|
public void TestNullability()
|
||||||
{
|
{
|
||||||
|
PlatformTestUtils.RunEverywhere();
|
||||||
|
|
||||||
var p = OSTailoredCode.IsUnixHost ? "/" : @"C:\";
|
var p = OSTailoredCode.IsUnixHost ? "/" : @"C:\";
|
||||||
|
|
||||||
Assert.IsFalse(PE.IsSubfolderOf(childPath: null, parentPath: p));
|
Assert.IsFalse(PE.IsSubfolderOf(childPath: null, parentPath: p));
|
||||||
|
|
|
@ -8,17 +8,36 @@ namespace BizHawk.Tests
|
||||||
{
|
{
|
||||||
public static void OnlyRunOnRealUnix()
|
public static void OnlyRunOnRealUnix()
|
||||||
{
|
{
|
||||||
|
#if SKIP_PLATFORM_TESTS
|
||||||
|
Assert.Inconclusive();
|
||||||
|
#else
|
||||||
if (!OSTailoredCode.IsUnixHost || OSTailoredCode.IsWSL) Assert.Inconclusive();
|
if (!OSTailoredCode.IsUnixHost || OSTailoredCode.IsWSL) Assert.Inconclusive();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OnlyRunOnUnix()
|
public static void OnlyRunOnUnix()
|
||||||
{
|
{
|
||||||
|
#if SKIP_PLATFORM_TESTS
|
||||||
|
Assert.Inconclusive();
|
||||||
|
#else
|
||||||
if (!OSTailoredCode.IsUnixHost) Assert.Inconclusive();
|
if (!OSTailoredCode.IsUnixHost) Assert.Inconclusive();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OnlyRunOnWindows()
|
public static void OnlyRunOnWindows()
|
||||||
{
|
{
|
||||||
|
#if SKIP_PLATFORM_TESTS
|
||||||
|
Assert.Inconclusive();
|
||||||
|
#else
|
||||||
if (OSTailoredCode.IsUnixHost) Assert.Inconclusive();
|
if (OSTailoredCode.IsUnixHost) Assert.Inconclusive();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RunEverywhere()
|
||||||
|
{
|
||||||
|
#if SKIP_PLATFORM_TESTS
|
||||||
|
Assert.Inconclusive();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue