Repository navigation
Run the tray core's tests on every platform - #985
Merged
Merged
Conversation
Moves the tests of DiffEngineTray.Core into DiffEngineTray.Core.Tests
(net10.0), which the unix CI job builds and runs under Release-NotWindows.
DiffEngineTray.Tests keeps what needs the head, and links the helpers both
use from the core's tests.
What stays Windows only is marked [RunOn(OS.Windows)] with the reason in
its summary: ProcessEx and FileLockKiller, a lock held by a Windows
PowerShell process, and Windows' refusal to move over or delete a file
open with no sharing or marked read-only.
Test data is written as the platform roots a path, and DebugReportTests
writes {Directory}\ for the separator everywhere, so one snapshot holds.
On macOS the inline key is case folded, so the Owned test's scrubber for the lowercased directory took the directory from in front of the separator before the separator scrubber ran, and the key read {Directory}/ there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2b of the cross-platform tray plan: the tray core's tests move to a project that runs on macOS and Linux as well as Windows. Nothing about the tray changes.
DiffEngineTray.Core.Tests(net10.0) takes 33 test classes and their snapshots, moved withgit mv. It is inRelease-NotWindows, so the unix job builds and runs it on ubuntu and macOS with no workflow change.DiffEngineTray.Testskeeps what needs the head: the menu, the forms, the hot keys andTrayViewerSyncTest. Two tests moved into it out of classes that went to the core, because they use head types:LockedFilesHandlerTestandDiffToolLauncherTest. The eight helpers both projects use (RecordingTracker,FakeViewer,FileLockUtilsand the rest) live with the core's tests and are linked into the head's.43 tests stay Windows only, marked with the repo's
[RunOn(OS.Windows)]and the reason in each summary. There are three kinds:ProcessExandFileLockKiller, which call kernel32, ntdll and the restart manager.The rest needed portable test data, not skips:
OwnedInlineHostTestbuilds its paths as the platform roots one. On Linuxc:\repo\X.csis one file name of the whole string, so every entry had the same name.DebugReportTestsbuilds its viewer path the same way, sinceC:\tools\DiffEngineViewer.exewasn't the viewer on Linux. The report also writes{Directory}\for the separator everywhere, so one snapshot holds.{Directory}\DiffEngineViewer.exe, and the source assampletests.cs.Tests:
dotnet/sdk:10.0container: 210 pass and 43 are skipped, out of 253.Still to come in phase 2: the menu becomes a model snapshot tested as text (2c).