[tests] Use NSTemporaryDirectory instead of Xamarin.Cache in FSEventStreamTest#25243
[tests] Use NSTemporaryDirectory instead of Xamarin.Cache in FSEventStreamTest#25243rolfbjarne wants to merge 1 commit intomainfrom
Conversation
…treamTest Replace Xamarin.Cache.CreateTemporaryDirectory() with a local helper that uses NSFileManager.TemporaryDirectory + Path.GetRandomFileName(). This is because Cache.CreateTemporaryDirectory() might create a path inside the current app bundle, which breaks incremental builds (they won't sign correctly). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS FSEventStreamTest to stop using Xamarin.Cache.CreateTemporaryDirectory() (which can create directories under the app bundle and break incremental build signing) and instead create temporary directories under the system temp directory, with symlinks resolved to match what FSEventStream reports.
Changes:
- Added a local
CreateTemporaryDirectory()helper that creates a directory underNSFileManager.TemporaryDirectory. - Resolved temp directory paths via
realpathto matchFSEventStreamCopyPathsBeingWatchedcanonicalized paths. - Replaced
Xamarin.Cache.CreateTemporaryDirectory()call sites in this test with the new helper.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #5c7b395] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #5c7b395] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #5c7b395] Build passed (Build macOS tests) ✅Pipeline on Agent |
🚀 [CI Build #5c7b395] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Replace Xamarin.Cache.CreateTemporaryDirectory() with a local helper that uses NSFileManager.TemporaryDirectory
This is because Cache.CreateTemporaryDirectory() might create a path inside the current
app bundle, which breaks incremental builds (they won't sign correctly).