Skip to content

fix(0.83, tests): restore macOS native test-host compilation - #3179

Open
Jason Morse (JasonVMo) wants to merge 1 commit into
0.83-stablefrom
0.83/user/jasonvmo/native-test-host
Open

Jason Morse (JasonVMo) wants to merge 1 commit into
0.83-stablefrom
0.83/user/jasonvmo/native-test-host

Conversation

@JasonVMo

Copy link
Copy Markdown

Summary:

Backport the source-compatible parts of #3095, by Ty Rauber
(742d47b5728a and 60f09c46099b), to 0.83-stable:

  • Replace UIKit-only UIImage references in shared image tests with the
    existing RCTPlatformImage alias.
  • Export the Objective-C++ gzip helper through its existing header with
    RCT_EXTERN, restoring C linkage for Objective-C test callers.
  • Add a react-native-macos patch Changeset.

This separate prerequisite makes #3178's bounded native resize regression
runnable in the existing macOS XCTest host. It does not include that
renderer fix, its fixture, or FURN/CI-workflow changes. Main already has
#3095, so no duplicate main PR is opened.

The old Xcode 26.0.1 sanitizer-disable workaround from #3095 is deliberately
not copied. The current toolchain executes the native-props fixture under
ASan and TSan; this PR changes no sanitizer/test-plan policy.

Test Plan:

The baseline macOS test target fails compiling its unchanged image tests.
With these exact four source-file changes applied to the isolated #3178
qualification worktree, the real XCTest target builds, links, and executes
the committed resize fixture: 1 test passed, 0 failures
.

Exact native commands, with NATIVE_PROPS_EVIDENCE denoting the local
qualification artifact directory:

RCT_NO_LAUNCH_PACKAGER=1 xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester-macOS -sdk macosx -destination 'platform=macOS,arch=arm64' -configuration Debug -jobs 2 -derivedDataPath "$NATIVE_PROPS_EVIDENCE/build-patched083-clean" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO -enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO -only-testing:RNTester-macOSUnitTests/RCTFabricNativePropsTests/testWindowResizeWhileUpdatingNativeProps build-for-testing
# PASSED: TEST BUILD SUCCEEDED.

RCT_NO_LAUNCH_PACKAGER=1 xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester-macOS -sdk macosx -destination 'platform=macOS,arch=arm64' -configuration Debug -jobs 2 -derivedDataPath "$NATIVE_PROPS_EVIDENCE/build-patched083-clean" -resultBundlePath "$NATIVE_PROPS_EVIDENCE/results-patched083-existing-host.xcresult" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO -enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO -parallel-testing-enabled NO -only-testing:RNTester-macOSUnitTests/RCTFabricNativePropsTests/testWindowResizeWhileUpdatingNativeProps test-without-building
# PASSED: TEST EXECUTE SUCCEEDED, 1 test, 0 failures.

The qualification worktree first regenerated Pods and clean-built all affected
native libraries. Its local-only profile selects a single ordinary run
without the pre-existing retry default. No assertions, tests, or animations
were disabled, and these profile overrides are not committed. Separate
sanitizer evidence belongs to the renderer PR, not this ordinary run.

Scoped source checks from the prerequisite worktree:

xcrun clang-format --dry-run --Werror --lines=144:149 packages/react-native/React/Base/RCTUtils.h
xcrun clang-format --dry-run --Werror --lines=764:764 packages/react-native/React/Base/RCTUtils.mm
xcrun clang-format --dry-run --Werror --lines=12:12 packages/rn-tester/RNTesterUnitTests/RCTGzipTests.m
xcrun clang-format --dry-run --Werror --lines=10:11 --lines=40:40 --lines=75:75 --lines=85:85 --lines=135:135 --lines=146:146 --lines=185:185 packages/rn-tester/RNTesterUnitTests/RCTImageLoaderTests.m
# PASSED: all changed native ranges.
git diff --check
# PASSED.

The Changeset's Ruby YAML check passed with exactly
{"react-native-macos"=>"patch"}. Not run: the entire native test suite,
legacy-bridge runtime tests on New-Architecture-only 0.83, iOS runtime,
repository-wide JS/Flow/lint suites, or publication. No PR is merged.

Adapt the image portability and gzip C-linkage fixes from #3095 (742d47b and 60f09c4). Keep sanitizer policy unchanged: ASan and TSan both execute with the current toolchain. This separate prerequisite makes the renderer resize regression's existing native host buildable.

Co-authored-by: Ty Rauber <tyrauber@mac.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33ea5c72-8bbd-448d-aa21-c9b99dd03c96

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant