public IEnumerable <KeyValuePair <string, string> > GetTraits(IAttributeInfo traitAttribute)
        {
            if (!DiscovererHelpers.IsMonoRuntime)
            {
                TestPlatforms        testPlatforms         = TestPlatforms.Any;
                RuntimeTestModes     stressMode            = RuntimeTestModes.Any;
                RuntimeConfiguration runtimeConfigurations = RuntimeConfiguration.Any;
                foreach (object arg in traitAttribute.GetConstructorArguments().Skip(1)) // We skip the first one as it is the reason
                {
                    if (arg is TestPlatforms tp)
                    {
                        testPlatforms = tp;
                    }
                    else if (arg is RuntimeTestModes rtm)
                    {
                        stressMode = rtm;
                    }
                    else if (arg is RuntimeConfiguration rc)
                    {
                        runtimeConfigurations = rc;
                    }
                }

                if (DiscovererHelpers.TestPlatformApplies(testPlatforms) && RuntimeConfigurationApplies(runtimeConfigurations) && StressModeApplies(stressMode))
                {
                    return(new[] { new KeyValuePair <string, string>(XunitConstants.Category, XunitConstants.Failing) });
                }
            }

            return(Array.Empty <KeyValuePair <string, string> >());
        }
 // Order here matters as some env variables may appear in multiple modes
 private static bool StressModeApplies(RuntimeTestModes stressMode) =>
 (stressMode.HasFlag(RuntimeTestModes.RegularRun) && !s_isStressTest.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.GCStress3) && s_isGCStress3.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.GCStressC) && s_isGCStressC.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.ZapDisable) && s_isZapDisable.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.TailcallStress) && s_isTailCallStress.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.JitStressRegs) && s_isJitStressRegs.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.JitStress) && s_isJitStress.Value) ||
 (stressMode.HasFlag(RuntimeTestModes.JitMinOpts) && s_isJitMinOpts.Value);
 public SkipOnCoreClrAttribute(string reason, TestPlatforms testPlatforms, RuntimeTestModes testMode)
 {
 }
 public SkipOnCoreClrAttribute(string reason, TestPlatforms testPlatforms, RuntimeConfiguration runtimeConfigurations, RuntimeTestModes testModes)
 {
 }
 public SkipOnCoreClrAttribute(string reason, RuntimeTestModes testMode)
 {
 }