Skip to content

Commit e2e49d0

Browse files
committed
- Skipping Analyzer tests on x86 due to OOM exception.
- Added '--ignore-exit-code 8' switch in PR builds to avoid build failure as xunit returns exit code 8 when the assembly has no tests to execute.
1 parent effcb7e commit e2e49d0

8 files changed

Lines changed: 8 additions & 1 deletion

File tree

eng/pipelines/build-PR.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
$(_OfficialBuildIdArgs)
9191
$(_InternalRuntimeDownloadArgs)
9292
/p:Coverage=$(_Coverage)
93-
/p:TestRunnerAdditionalArguments='--filter-not-trait Category=IgnoreForCI --filter-not-trait Category=failing'
93+
/p:TestRunnerAdditionalArguments='--filter-not-trait Category=IgnoreForCI --filter-not-trait Category=failing --ignore-exit-code 8'
9494
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Test-${{ parameters.targetArchitecture }}.binlog
9595
/m:1
9696
displayName: Run Unit Tests

src/System.Windows.Forms.Analyzers.CSharp/tests/UnitTests/Analyzers/AvoidPassingTaskWithoutCancellationToken/AvoidPassingTaskWithoutCancellationTokenTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace System.Windows.Forms.Analyzers.Tests;
1111

1212
[ForceGC]
13+
[SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")]
1314
public sealed class AvoidPassingTaskWithoutCancellationTokenTests
1415
{
1516
private const string TestCode = """

src/System.Windows.Forms.Analyzers.CSharp/tests/UnitTests/Analyzers/MissingPropertySerializationConfiguration/ControlPropertySerializationDiagnosticAnalyzerTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace System.Windows.Forms.Analyzers.Tests;
1111

1212
[ForceGC]
13+
[SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")]
1314
public sealed class ControlPropertySerializationDiagnosticAnalyzerTest
1415
{
1516
private const string GlobalUsingCode = """

src/System.Windows.Forms.Analyzers.CSharp/tests/UnitTests/Analyzers/WFO1001/ImplementITypedDataObjectTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace System.Windows.Forms.Analyzers.Tests;
1111

1212
[ForceGC]
13+
[SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")]
1314
public sealed class ImplementITypedDataObjectTests
1415
{
1516
private const string DiagnosticId = DiagnosticIDs.ImplementITypedDataObject;

src/System.Windows.Forms.Analyzers.CSharp/tests/UnitTests/Generators/ApplicationConfigurationGenerator/ApplicationConfigurationGeneratorTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace System.Windows.Forms.Analyzers.Tests;
1313

1414
[ForceGC]
15+
[SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")]
1516
public partial class ApplicationConfigurationGeneratorTests
1617
{
1718
private const string SourceCompilable = """

src/System.Windows.Forms.Analyzers.VisualBasic/tests/UnitTests/System.Windows.Forms.Analyzers.VisualBasic.Tests/Analyzers/AvoidPassingTaskWithoutCancellationTokenTests.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Imports Microsoft.CodeAnalysis.VisualBasic.Testing
1111
Imports Xunit
1212

1313
<ForceGC()>
14+
<SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")>
1415
Public Class AvoidPassingTaskWithoutCancellationTokenTests
1516

1617
Private Const TestCode As String = "

src/System.Windows.Forms.Analyzers.VisualBasic/tests/UnitTests/System.Windows.Forms.Analyzers.VisualBasic.Tests/Analyzers/MissingPropertySerializationConfigurationAnalyzerTest.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Imports Microsoft.CodeAnalysis.VisualBasic.Testing
66
Imports Xunit
77

88
<ForceGC()>
9+
<SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")>
910
Public Class ControlPropertySerializationDiagnosticAnalyzerTest
1011

1112
Private Const ProblematicCode As String =

src/System.Windows.Forms.Analyzers.VisualBasic/tests/UnitTests/System.Windows.Forms.Analyzers.VisualBasic.Tests/Analyzers/WFO1001/ImplementITypedDataObjectTests.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Imports Microsoft.CodeAnalysis.VisualBasic.Testing
99
Imports Xunit
1010

1111
<ForceGC()>
12+
<SkipOnArchitecture(TestArchitectures.X86, "Analyzer tests hit OutOfMemoryException on x86 due to memory-mapped NuGet package extraction")>
1213
Public NotInheritable Class ImplementITypedDataObjectTests
1314

1415
Private Const DiagnosticId As String = DiagnosticIDs.ImplementITypedDataObject

0 commit comments

Comments
 (0)