microsoft / scalar

Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
MIT License
1.39k stars 63 forks source link

Clean up functional test MacTODO categories and Windows-only option #421

Closed chrisd8088 closed 4 years ago

chrisd8088 commented 4 years ago

Prior to starting work to support runs of the functional test suite on Linux, we can simplify some of the tests marked MacTODO as no longer needing that designation and also simplify some of the Windows-related configuration and options.

On the Windows side of thing, we can remove the second invocation of excludeCategories.Add(Categories.MacOnly) because it is always performed on Windows in the if/else block just above it.

We also only parse the --windows-only functional test command-line option when running on Windows, as it has no effect on macOS since the WindowsOnly tests are always excluded there.

On the macOS side of things, there is one test still marked MacTODO.NeedsServiceVerb which appears to have been missed in PR #216, where that category was removed from many other tests. This SecondCloneSucceedsWithMissingTrees test succeeds on macOS as written, so it seems OK to remove the MacTODO flag on it.

The other macOS change we make is to remove the MacTODO.NeedsScalarConfig category, which currently applies to all the tests in MultiEnlistmentTests/ConfigVerbTests.cs. These tests are also marked with NeedsUpdatesForNonVirtualizedMode and therefore will continue to not run even after this change. (However, limited testing by disabling the config verb's "elevated privileges" checks and removing NeedsUpdatesForNonVirtualizedMode from the ConfigVerbTests indicates that, in fact, these tests would all succeed on macOS/Linux with some further adjustments. But for now we just remove the "extra" MacTODO exclusion on these tests.)

These two changes allow us to remove two of the three MacTODO categories entirely.

We also do minor housekeeping by fixing one typo in the Watchman shutdown-server command.