Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public AotCompatibilityTests(ITestOutputHelper testOutputHelper)
///
/// You can also 'dotnet publish' the 'Microsoft.IdentityModel.AotCompatibility.TestApp.csproj' as well to get the errors.
/// </summary>
[Fact]
[IgnoreOnAzureDevopsFact]
public void EnsureAotCompatibility()
{
string testAppPath = Path.Combine("..", "..", "..", "..", "Microsoft.IdentityModel.AotCompatibility.TestApp");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using Xunit;

namespace Microsoft.IdentityModel.AotCompatibility.Tests
{
public sealed class IgnoreOnAzureDevopsFactAttribute : FactAttribute
{
public IgnoreOnAzureDevopsFactAttribute()
{
if (!IsRunningOnAzureDevOps())
{
return;
}

Skip = "Ignored on Azure DevOps";
}

/// <summary>Determine if runtime is Azure DevOps.</summary>
/// <returns>True if being executed in Azure DevOps, false otherwise.</returns>
public static bool IsRunningOnAzureDevOps()
{
return Environment.GetEnvironmentVariable("SYSTEM_DEFINITIONID") != null;
}
}
}