Skip to content

Commit

Permalink
parse --windows-only func test arg on Windows only
Browse files Browse the repository at this point in the history
The --windows-only functional test command-line option causes
only tests in the WindowsOnly category to be run; since this
makes sense on Windows exclusively, we move the parsing of this
command-line argument into a Windows-only block, so it will be
ignored on other platforms.
  • Loading branch information
chrisd8088 committed Aug 17, 2020
1 parent 23656d2 commit d68c5af
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Scalar.FunctionalTests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ 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);
excludeCategories.Add(Categories.WindowsOnly);
}
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);
}

Expand Down

0 comments on commit d68c5af

Please sign in to comment.