Skip to content

Commit 9c01ee4

Browse files
authored
[tests] Ignore any blittable P/Invoke test if not all platforms are enabled. (#23773)
These tests aggregate test failures across all platforms, which means any known failure list might be incorrect if not testing all platforms.
1 parent f8853d8 commit 9c01ee4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/cecil-tests/BlittablePInvokes.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ public int CompareTo (object? obj)
216216
[Test]
217217
public void NoMarshalAsAttributes ()
218218
{
219+
Configuration.IgnoreIfAnyIgnoredPlatforms ();
220+
219221
var failures = new Dictionary<string, NoMarshalAsFailure> ();
220222
var marshalProviders = new List<IMarshalInfoProvider> ();
221223
foreach (var info in Helper.NetPlatformImplementationAssemblyDefinitions) {
@@ -248,6 +250,8 @@ public void NoMarshalAsAttributes ()
248250
[Test]
249251
public void CheckForNonBlittablePInvokes ()
250252
{
253+
Configuration.IgnoreIfAnyIgnoredPlatforms ();
254+
251255
var failures = new Dictionary<string, NonBlittablePInvokesFailure> ();
252256
var pinvokes = new List<(AssemblyDefinition Assembly, MethodDefinition Method)> ();
253257

@@ -433,6 +437,8 @@ IEnumerable<MethodDefinition> AllPInvokes (AssemblyDefinition assembly)
433437
[Test]
434438
public void CheckForBlockLiterals ()
435439
{
440+
Configuration.IgnoreIfAnyIgnoredPlatforms ();
441+
436442
var failures = new Dictionary<string, (string Message, string Location)> ();
437443

438444
foreach (var info in Helper.NetPlatformImplementationAssemblyDefinitions) {
@@ -494,6 +500,8 @@ public void CheckForBlockLiterals ()
494500
[Test]
495501
public void CheckForMonoPInvokeCallback ()
496502
{
503+
Configuration.IgnoreIfAnyIgnoredPlatforms ();
504+
497505
var failures = new Dictionary<string, (string Message, string Location)> ();
498506

499507
foreach (var info in Helper.NetPlatformImplementationAssemblyDefinitions) {

0 commit comments

Comments
 (0)