Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore AotCompatibilityTests on ADO #2992

Merged
merged 2 commits into from
Nov 9, 2024
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;
}
}
}
Loading