Skip to content

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Dec 29, 2021

Description

macOS tests fail to build with latest Xcode:

/~/ios/ExampleTests/ManifestTests.swift:15:13: error: cannot find 'XCTFail' in scope
            XCTFail("Failed to read 'app.json'")
            ^~~~~~~
/~/ios/ExampleTests/ManifestTests.swift:19:9: error: cannot find 'XCTAssertEqual' in scope
        XCTAssertEqual(checksum.count, 64)
        ^~~~~~~~~~~~~~

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows

Test plan

  1. Should build successfully with latest Xcode:
    cd example
    pod install --project-directory=macos
    ../scripts/xcodebuild.sh macos/Example.xcworkspace build-for-testing
    
  2. We should not overwrite existing setting. The following should fail the build:
    diff --git a/example/Example-Tests.podspec b/example/Example-Tests.podspec
    index f504e44..6b65a70 100644
    --- a/example/Example-Tests.podspec
    +++ b/example/Example-Tests.podspec
    @@ -18,6 +18,7 @@ Pod::Spec.new do |s|
       s.dependency 'ReactTestApp-DevSupport'
    
       s.framework             = 'XCTest'
    +  s.pod_target_xcconfig   = { 'ENABLE_TESTING_SEARCH_PATHS' => 'NO' }
       s.user_target_xcconfig  = { 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => '$(inherited)' }
    
       s.source_files = 'ios/ExampleTests/**/*.{m,swift}'

@tido64 tido64 requested a review from kelset December 29, 2021 21:36
@github-actions github-actions bot added platform: iOS This affects iOS platform: macOS This affects macOS labels Dec 29, 2021
@tido64 tido64 force-pushed the tido/fix-test-builds branch from 33d72c1 to 0c70e9c Compare December 30, 2021 00:13
@tido64 tido64 force-pushed the tido/fix-test-builds branch from 0c70e9c to 14bfebf Compare December 30, 2021 00:17
@tido64 tido64 added this to the 1.0 milestone Dec 30, 2021
@tido64 tido64 mentioned this pull request Dec 30, 2021
31 tasks
@tido64 tido64 enabled auto-merge (squash) January 3, 2022 11:25
@tido64 tido64 disabled auto-merge January 3, 2022 11:25
@tido64 tido64 merged commit 50ba9b6 into trunk Jan 3, 2022
@tido64 tido64 deleted the tido/fix-test-builds branch January 3, 2022 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: iOS This affects iOS platform: macOS This affects macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants