示例#1
0
 private RuntimeFlavor GetRuntimeFlavor(string tfm)
 {
     if (Tfm.Matches(Tfm.Net461, tfm))
     {
         return(RuntimeFlavor.Clr);
     }
     return(RuntimeFlavor.CoreClr);
 }
示例#2
0
        private static string SkipIfTfmIsNotSupportedOnThisOS(string tfm)
        {
            if (Tfm.Matches(Tfm.Net461, tfm) && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return("This TFM is not supported on this operating system.");
            }

            return(null);
        }
示例#3
0
        private void VaryByApplicationType(List <TestVariant> variants, ServerType server, string tfm, string skip)
        {
            foreach (var t in ApplicationTypes)
            {
                var type = t;
                if (Tfm.Matches(Tfm.Net461, tfm) && type == ApplicationType.Portable)
                {
                    if (ApplicationTypes.Count == 1)
                    {
                        // Override the default
                        type = ApplicationType.Standalone;
                    }
                    else
                    {
                        continue;
                    }
                }

                VaryByArchitecture(variants, server, tfm, skip, type);
            }
        }
示例#4
0
        private void VaryByAncmHostingModel(IList <TestVariant> variants, ServerType server, string tfm, ApplicationType type, RuntimeArchitecture arch, string skip)
        {
            foreach (var hostingModel in HostingModels)
            {
                var skipAncm = skip;
                if (hostingModel == HostingModel.InProcess)
                {
                    // Not supported
                    if (Tfm.Matches(Tfm.Net461, tfm) || Tfm.Matches(Tfm.NetCoreApp20, tfm))
                    {
                        continue;
                    }

                    if (!IISExpressAncmSchema.SupportsInProcessHosting)
                    {
                        skipAncm = skipAncm ?? IISExpressAncmSchema.SkipReason;
                    }
                }

                // https://github.com/aspnet/AspNetCore/issues/8329
                if (hostingModel == HostingModel.OutOfProcess &&
                    server == ServerType.IISExpress &&
                    Environment.OSVersion.Version.Major == 6 &&
                    Environment.OSVersion.Version.Minor == 1)
                {
                    continue;
                }

                variants.Add(new TestVariant()
                {
                    Server          = server,
                    Tfm             = tfm,
                    ApplicationType = type,
                    Architecture    = arch,
                    HostingModel    = hostingModel,
                    Skip            = skipAncm,
                });
            }
        }
示例#5
0
 private bool CheckTfmIsSupportedForServer(string tfm, ServerType server)
 {
     // Not a combination we test
     return(!(Tfm.Matches(Tfm.Net461, tfm) && ServerType.Nginx == server));
 }