Skip to content

Commit

Permalink
Add mac CI (dotnet#34849)
Browse files Browse the repository at this point in the history
* 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 authored Apr 12, 2019
1 parent 56a229e commit 66ac3f2
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 7 deletions.
31 changes: 29 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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())

2 changes: 1 addition & 1 deletion eng/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
4 changes: 3 additions & 1 deletion src/Compilers/CSharp/Test/Emit/Emit/EndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -100,10 +100,12 @@ void M2() {

[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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 66ac3f2

Please sign in to comment.