Skip to content
Permalink
Browse files

Add mac CI (#34849)

* Update config

* Disable some tests on Mac. Only have a mac coreclr job.

* Move the DeeplyNestedGeneric bar way down for Mac

* Add work item attributes for disabled tests
  • Loading branch information...
RikkiGibson committed Apr 12, 2019
1 parent 56a229e commit 66ac3f2bd9208e5f251c2db8d4439f7a1661f0ba
@@ -179,14 +179,14 @@ jobs:
condition: succeeded()

- job: Linux_Test
pool:
pool:
name: NetCorePublic-Int-Pool
queue: BuildPool.Ubuntu.1604.amd64.Open
strategy:
maxParallel: 2
matrix:
coreclr:
_args: --testCoreClr
_args: --testCoreClr --docker
_name: CoreClr
_configuration: Debug
mono:
@@ -215,3 +215,30 @@ jobs:
continueOnError: true
condition: not(succeeded())

- job: macOS_Test
pool:
vmImage: 'macOS-10.13'
timeoutInMinutes: 90

steps:
- script: ./eng/cibuild.sh --configuration Debug --prepareMachine --testCoreClr
displayName: Build and Test

- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/Debug/*.xml'
mergeTestResults: true
testRunTitle: 'macOS CoreClr'
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/Debug'
ArtifactName: 'macOS CoreClr'
publishLocation: Container
continueOnError: true
condition: not(succeeded())

@@ -16,4 +16,4 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd)"
echo "Building this commit:"
git show --no-patch --pretty=raw HEAD

. "$scriptroot/build.sh" --docker --ci --restore --build --bootstrap --pack --publish --binaryLog "$@"
. "$scriptroot/build.sh" --ci --restore --build --bootstrap --pack --publish --binaryLog "$@"
@@ -46,7 +46,7 @@ private static void RunInThread(Action action)
// This test is a canary attempting to make sure that we don't regress the # of fluent calls that
// the compiler can handle.
[WorkItem(16669, "https://github.com/dotnet/roslyn/issues/16669")]
[Fact]
[ConditionalFact(typeof(WindowsOrLinuxOnly)), WorkItem(34880, "https://github.com/dotnet/roslyn/issues/34880")]
public void OverflowOnFluentCall()
{
int numberFluentCalls = (ExecutionConditionUtil.Architecture, ExecutionConditionUtil.Configuration) switch
@@ -100,10 +100,12 @@ void tryCompileDeepFluentCalls(int depth)

[Fact]
[WorkItem(33909, "https://github.com/dotnet/roslyn/issues/33909")]
[WorkItem(34880, "https://github.com/dotnet/roslyn/issues/34880")]
public void DeeplyNestedGeneric()
{
int nestingLevel = (ExecutionConditionUtil.Architecture, ExecutionConditionUtil.Configuration) switch
{
_ when ExecutionConditionUtil.IsMacOS => 100,
_ when ExecutionConditionUtil.IsCoreClrUnix => 1200,
_ when ExecutionConditionUtil.IsMonoDesktop => 730,
(ExecutionArchitecture.x86, ExecutionConfiguration.Debug) => 270,
@@ -62,7 +62,8 @@ public async Task NoServerMutex()
Assert.Equal(CommonCompiler.Succeeded, exitCode);
}

[Fact]
[ConditionalFact(typeof(WindowsOrLinuxOnly))]
[WorkItem(34880, "https://github.com/dotnet/roslyn/issues/34880")]
public async Task NoServerConnection()
{
using (var readyMre = new ManualResetEvent(initialState: false))
@@ -111,7 +112,8 @@ public async Task NoServerConnection()
/// the client can error out.
/// </summary>
/// <returns></returns>
[Fact]
[ConditionalFact(typeof(WindowsOrLinuxOnly))]
[WorkItem(34880, "https://github.com/dotnet/roslyn/issues/34880")]
public async Task ServerShutdownsDuringProcessing()
{
using (var readyMre = new ManualResetEvent(initialState: false))
@@ -1781,7 +1781,7 @@ IObjectCreationOperation (Constructor: Sub scen2..ctor()) (OperationKind.ObjectC
VerifyOperationTreeAndDiagnosticsForTest(Of ObjectCreationExpressionSyntax)(source, expectedOperationTree, expectedDiagnostics)
End Sub

<Fact(), WorkItem(788522, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/788522")>
<ConditionalFact(GetType(WindowsOrLinuxOnly)), WorkItem(34880, "https://github.com/dotnet/roslyn/issues/34880"), WorkItem(788522, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/788522")>
Public Sub ObjectInitializerNoStackOverflowFor150LevelsOfNesting()
Dim source =
<compilation>
@@ -4,6 +4,7 @@
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Test.Utilities;
@@ -157,6 +158,7 @@ public static class ExecutionConditionUtil

public static bool IsWindows => Path.DirectorySeparatorChar == '\\';
public static bool IsUnix => !IsWindows;
public static bool IsMacOS => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsDesktop => RuntimeUtilities.IsDesktopRuntime;
public static bool IsWindowsDesktop => IsWindows && IsDesktop;
public static bool IsMonoDesktop => Type.GetType("Mono.Runtime") != null;
@@ -253,6 +255,12 @@ public class UnixLikeOnly : ExecutionCondition
public override string SkipReason => "Test not supported on Windows";
}

public class WindowsOrLinuxOnly : ExecutionCondition
{
public override bool ShouldSkip => ExecutionConditionUtil.IsMacOS;
public override string SkipReason => "Test not supported on macOS";
}

public class ClrOnly : ExecutionCondition
{
public override bool ShouldSkip => MonoHelpers.IsRunningOnMono();

0 comments on commit 66ac3f2

Please sign in to comment.
You can’t perform that action at this time.