private bool VersionMatches(TestDescriptor test, Version runtimeVersion) { if (test.VersionSpecific) { if ((runtimeVersion.Major + ".x").Equals(test.Version, StringComparison.Ordinal)) { return(true); } else if (runtimeVersion.MajorMinor.Equals(test.Version, StringComparison.Ordinal)) { return(true); } return(false); } else { var testVersion = Version.Parse(test.Version); if (runtimeVersion >= testVersion) { return(true); } return(false); } }
public bool ShouldRunTest(SystemUnderTest system, TestDescriptor test) { if (!test.Enabled) { return(false); } if (!VersionMatches(test, system.RuntimeVersion)) { return(false); } if (system.SdkVersion == null && test.RequiresSdk) { return(false); } var skipped = system.CurrentPlatformIds .Where(rid => test.IgnoredRIDs.Contains(rid)) .Any(); if (skipped) { return(false); } return(true); }
public bool ShouldRunTest(SystemUnderTest system, TestDescriptor test) { if (!test.Enabled) { return(false); } if (!VersionMatches(test, system.RuntimeVersion)) { return(false); } var blacklisted = system.CurrentPlatformIds .Where(rid => test.PlatformBlacklist.Contains(rid)) .Any(); if (blacklisted) { return(false); } return(true); }
public XUnitTest(DirectoryInfo directory, SystemUnderTest system, string nuGetConfig, TestDescriptor descriptor, bool enabled) : base(directory, system, nuGetConfig, descriptor, enabled) { }
public Test(DirectoryInfo testDirectory, SystemUnderTest system, string nuGetConfig, TestDescriptor descriptor, bool enabled) { this.Directory = testDirectory; this.SystemUnderTest = system; this.NuGetConfig = nuGetConfig; this.Descriptor = descriptor; this.Skip = !enabled; }
public BashTest(DirectoryInfo directory, SystemUnderTest system, string nuGetConfig, TestDescriptor test, bool enabled) : base(directory, system, nuGetConfig, test, enabled) { }