Disable F# tests on linux-x64.
linux-x64 only has .NET Core 2.0, but F# requires .NET Core 1.0 runtime.
This commit is contained in:
parent
4fc2e8e19a
commit
bd58bcf03b
3 changed files with 19 additions and 4 deletions
|
@ -1,22 +1,30 @@
|
|||
// 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 Microsoft.DotNet.PlatformAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public static class EnvironmentInfo
|
||||
{
|
||||
public static bool HasSharedFramework(string framework)
|
||||
{
|
||||
string rid = RepoDirectoriesProvider.BuildRid;
|
||||
|
||||
if (framework == "netcoreapp1.0")
|
||||
{
|
||||
string rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
switch (rid)
|
||||
{
|
||||
case "fedora.24-x64":
|
||||
case "opensuse.42.1-x64":
|
||||
case "ubuntu.16.10-x64":
|
||||
case "linux-x64":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (framework == "netcoreapp1.1")
|
||||
{
|
||||
switch (rid)
|
||||
{
|
||||
case "linux-x64":
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
}
|
||||
}
|
||||
|
||||
private static string BuildRid
|
||||
public static string BuildRid
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
|
@ -34,6 +34,13 @@ namespace Microsoft.DotNet.New.Tests
|
|||
string projectType,
|
||||
bool useNuGetConfigForAspNet)
|
||||
{
|
||||
if (language == "F#" && !EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
|
||||
{
|
||||
// F# requires netcoreapp1.0 to be present in order to build
|
||||
// https://github.com/dotnet/netcorecli-fsc/issues/76
|
||||
return;
|
||||
}
|
||||
|
||||
string rootPath = TestAssets.CreateTestDirectory(identifier: $"{language}_{projectType}").FullName;
|
||||
|
||||
new TestCommand("dotnet") { WorkingDirectory = rootPath }
|
||||
|
|
Loading…
Reference in a new issue