Disable R2R publish test for Mono (#16900)
This commit is contained in:
parent
62ef57f114
commit
9c792aa68d
3 changed files with 28 additions and 2 deletions
|
@ -27,9 +27,14 @@ public class BasicScenarioTests : SmokeTests
|
|||
|
||||
public static IEnumerable<TestScenario> GetScenarios()
|
||||
{
|
||||
// Since this has to be a static method, we don't have access to XUnit's output helper. So we use our own version as a placeholder.
|
||||
DotNetHelper helper = new(new DebugTestOutputHelper());
|
||||
|
||||
foreach (DotNetLanguage language in Enum.GetValues<DotNetLanguage>())
|
||||
{
|
||||
yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.Console, DotNetActions.Build | DotNetActions.Run | DotNetActions.PublishComplex | DotNetActions.PublishR2R);
|
||||
yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.Console,
|
||||
// R2R is not supported on Mono (see https://github.com/dotnet/runtime/issues/88419#issuecomment-1623762676)
|
||||
DotNetActions.Build | DotNetActions.Run | DotNetActions.PublishComplex | (helper.IsMonoRuntime ? DotNetActions.None : DotNetActions.PublishR2R));
|
||||
yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.ClassLib, DotNetActions.Build | DotNetActions.Publish);
|
||||
yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.XUnit, DotNetActions.Test);
|
||||
yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.NUnit, DotNetActions.Test);
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
|
||||
|
||||
internal class DebugTestOutputHelper : ITestOutputHelper
|
||||
{
|
||||
public void WriteLine(string message)
|
||||
{
|
||||
Debug.WriteLine(message);
|
||||
}
|
||||
|
||||
public void WriteLine(string format, params object[] args)
|
||||
{
|
||||
Debug.WriteLine(format, args);
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ internal class DotNetHelper
|
|||
public static string ProjectsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), $"projects-{DateTime.Now:yyyyMMddHHmmssffff}");
|
||||
|
||||
private ITestOutputHelper OutputHelper { get; }
|
||||
private bool IsMonoRuntime { get; }
|
||||
public bool IsMonoRuntime { get; }
|
||||
|
||||
public DotNetHelper(ITestOutputHelper outputHelper)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue