diff --git a/Scalar.FunctionalTests/Program.cs b/Scalar.FunctionalTests/Program.cs index 97f6c4727e..86db0ac043 100644 --- a/Scalar.FunctionalTests/Program.cs +++ b/Scalar.FunctionalTests/Program.cs @@ -76,15 +76,6 @@ public static void Main(string[] args) ScalarTestConfig.FileSystemRunners = FileSystemRunners.FileSystemRunner.DefaultRunners; } - if (runner.HasCustomArg("--windows-only")) - { - includeCategories.Add(Categories.WindowsOnly); - - // RunTests unions all includeCategories. Remove ExtraCoverage to - // ensure that we only run tests flagged as WindowsOnly - includeCategories.Remove(Categories.ExtraCoverage); - } - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { excludeCategories.Add(Categories.MacTODO.TestNeedsToLockFile); @@ -92,6 +83,15 @@ public static void Main(string[] args) } else { + if (runner.HasCustomArg("--windows-only")) + { + includeCategories.Add(Categories.WindowsOnly); + + // RunTests unions all includeCategories. Remove ExtraCoverage to + // ensure that we only run tests flagged as WindowsOnly + includeCategories.Remove(Categories.ExtraCoverage); + } + excludeCategories.Add(Categories.MacOnly); }