Move eligible KeystoneTests into the cross-platform Swift package tests#25815
Merged
Conversation
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33414 | |
| Version | PR #25815 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | eb9545f | |
| Installation URL | 2cc9hgh2pusn0 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33414 | |
| Version | PR #25815 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | eb9545f | |
| Installation URL | 1rkc6290nsb90 |
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
jkmassel
force-pushed
the
jkmassel/migrate-tests-to-modules
branch
from
July 22, 2026 17:56
b06ab80 to
6e9a61a
Compare
jkmassel
enabled auto-merge
July 22, 2026 20:32
This was referenced Jul 22, 2026
crazytonyli
approved these changes
Jul 22, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 22, 2026
4 tasks
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 23, 2026
jkmassel
force-pushed
the
jkmassel/migrate-tests-to-modules
branch
2 times, most recently
from
July 23, 2026 21:05
4c13b73 to
60ff71e
Compare
Relocate the Queue, LoggingURLRedactor, DashboardDynamicCardAnalyticsEvent, SiteCreationHeaderData, QRLoginURLParser, and ReaderCSS tests from KeystoneTests into WordPressSharedTests, moving each subject into WordPressShared so it builds on macOS and runs under `swift test` at the repo root. Also move URLHelpersTests and delete two stale KeystoneTests copies (DictionaryHelpersTests, URLIncrementalFilenameTests) whose WordPressShared copies already ran.
…PressShared Move the Array and Math extensions and NotificationCenter.observeOnce into WordPressShared, and split IncrementalDelay out of Delay.swift (leaving the GCD DispatchDelayedAction/DelayStateWrapper helpers in the app). Relocate their tests into WordPressSharedTests and add the WordPressShared import to the remaining callers.
Relocate the String.hash guard test from KeystoneTests to WordPressSharedTests so it runs under `swift test` at the repo root. #25811 moved the other Gutenberg tests into GutenbergProcessorsTests but left this one behind — it asserts a Swift String hash value and has no processor dependency. Drops the vestigial `@testable import WordPress`.
jkmassel
force-pushed
the
jkmassel/migrate-tests-to-modules
branch
from
July 23, 2026 21:16
60ff71e to
eb9545f
Compare
jkmassel
added a commit
that referenced
this pull request
Jul 23, 2026
#25815 (KeystoneTests move) and #25825 (Foundation extensions) relocated 15 more XCTest suites into WordPressSharedTests after this branch was first written; convert them too so the swift test set stays entirely Swift Testing. NotificationCenterObserveOnceTests is pinned to @suite(.serialized) because its two tests share NotificationCenter.default and would race under Swift Testing's parallelism; QueueTests stays a final class because Queue is a value type it mutates.
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.


Moves 11 test suites — and the sources they exercise — out of the Xcode-only
KeystoneTestsbundle intoWordPressShared, so they run underswift testat the repo root. That's the macOS cross-platform gate added in #25344: it runs on a bare checkout with no Xcode project, no simulator, and no app build, in about 20 seconds. These suites previously only ran inside the full iOS unit-test build.Summary
Tests/KeystoneTeststoModules/Tests/WordPressSharedTests.Modules/Sources/WordPressSharedso those tests have a macOS-buildable subject to import.DictionaryHelpersTests,URLIncrementalFilenameTests) whoseWordPressSharedcopies already ran.swift testrun; the iOS suite keeps every one of these tests via the existingWordPressSharedTeststarget inWordPressUnitTests.xctestplan.What moved
All into
WordPressShared, with the test alongside inWordPressSharedTests:Queue,Arrayextensions,Mathextensions,NotificationCenter.observeOnce,LoggingURLRedactor,IncrementalDelay(split out ofDelay.swift, leaving theDispatchDelayedAction/DelayStateWrapperGCD helpers in the app),QRLoginURLParser/QRLoginToken,ReaderCSS,SiteCreationHeaderData,DashboardDynamicCardAnalyticsEvent.The two commits map to these groups: the utility batch, and the Array/Math/NotificationCenter/IncrementalDelay batch.
Why a test move drags a source move
swift testat the root builds theWordPressCrossPlatformModulespackage, which depends only on macOS-clean products. A test can only run there if its subject lives in one of those modules — so each extracted type moves intoWordPressShared, gets the members the app touches markedpublic, and every remaining caller picks up animport WordPressShared. BecauseWordPress/ClassesandTests/KeystoneTestsare file-system-synchronized groups, none of this needs.pbxprojedits.Sources with user-facing
NSLocalizedStringwere left in place on purpose. Moving translated strings into a module changes their bundle at lookup time and drops them from the app's GlotPress extraction, so candidates likeSiteIntentData,ErrorStateViewConfiguration,PluginStore, andMediaSizeSliderCellare excluded here.Not the Gutenberg processors
An earlier revision of this PR also extracted the Gutenberg content processors into
WordPressShared. #25811 landed the same extraction independently — into a dedicatedGutenbergProcessorsmodule, with the SwiftSoup 2.13.6 serialization fix — so that work is dropped here to avoid duplicating it. Those suites already run underswift testviaGutenbergProcessorsTests. The one exceptionMediaUploadHashTests(aString.hashguard with no processor dependency, which #25811 left in Keystone) is relocated toWordPressSharedTestshere.Not in this PR
Remaining KeystoneTests candidates each need infrastructure this PR doesn't add, and are follow-ups: a macOS
WordPressKitTestsroot target (unblocks NSAttributedString, SiteSegment, TimeZoneFormatter, Pinghub, StatsPeriodAsyncOperation, the Dashboard view models); resource-bundle support onWordPressSharedTestsfor fixture-based tests (StockPhotos, SiteSegment, PluginDirectoryEntry);WordPressCoreextractions entangled with the feature-flag store; and a new module for the WhatsNew announcement store.Test plan
swift testfrom the repo root: the 12 relocated suites run under theWordPressSharedTests.xctestbundle — 41 tests, 0 failures (part of the full cross-platform run on the rebased branch, alongside trunk's other suites).xcodebuild build-for-testing -scheme WordPressagainst current trunk:** TEST BUILD SUCCEEDED **— the app,KeystoneTests, and everyModules/*test target still compile.swiftlint --strict: 0 violations across the changed Swift files.WordPressSharedTestsin the iOS Unit Tests job and none remain in theWordPressTest(Keystone) bundle (that run predates dropping the Gutenberg commit; the merge queue re-validates the current HEAD).