Skip to content

Commit

Permalink
Add Swift integration tests to macOS and tvOS builds (#3336)
Browse files Browse the repository at this point in the history
* Add deployment_targets for macOS and tvOS in FirebaseFirestoreSwift

* Add FirebaseFirestoreSwift as a dependency to all integration tests

* Add swift integration tests to sync_project.rb
  • Loading branch information
wilhuff authored Jul 12, 2019
1 parent 3b49631 commit 79627a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions FirebaseFirestoreSwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,

s.swift_version = '4.0'
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '10.0'

s.cocoapods_version = '>= 1.4.0'
s.static_framework = true
Expand Down
4 changes: 4 additions & 0 deletions Firestore/Example/Firestore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
198F193BD9484E49375A7BE7 /* FSTHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E03A2021401F00B64F25 /* FSTHelpers.mm */; };
1C19D796DB6715368407387A /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; };
1C7254742A9F6F7042C9D78E /* FSTEventAccumulator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0392021401F00B64F25 /* FSTEventAccumulator.mm */; };
1C79AE3FBFC91800E30D092C /* CodableIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */; };
1CAA9012B25F975D445D5978 /* strerror_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 358C3B5FE573B1D60A4F7592 /* strerror_test.cc */; };
1CC9BABDD52B2A1E37E2698D /* mutation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8522DE226C467C54E6788D8 /* mutation_test.cc */; };
1DFAEEE901B4E517A4CB9CAD /* FSTMemoryMutationQueueTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0972021552C00B64F25 /* FSTMemoryMutationQueueTests.mm */; };
Expand Down Expand Up @@ -582,6 +583,7 @@
CD78EEAA1CD36BE691CA3427 /* hashing_test_apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = B69CF3F02227386500B281C8 /* hashing_test_apple.mm */; };
CE222EAE5BD7D4CDEA8528BF /* objc_class_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B3CC6B2ACFDC873F06AE9E3F /* objc_class_test.cc */; };
CEDDC6DB782989587D0139B2 /* datastore_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 546854A820A36867004BDBD5 /* datastore_test.mm */; };
CF5DE1ED21DD0A9783383A35 /* CodableIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124C932B22C1642C00CA8C2D /* CodableIntegrationTests.swift */; };
D063F56AC89E074F9AB05DD3 /* FSTRemoteDocumentCacheTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E09C2021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm */; };
D22B96C19A0F3DE998D4320C /* delayed_constructor_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0A6E9136804A41CEC9D55D4 /* delayed_constructor_test.cc */; };
D44DA2F61B854E8771E4E446 /* memory_index_manager_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 73F1F7392210F3D800E1F692 /* memory_index_manager_test.mm */; };
Expand Down Expand Up @@ -3366,6 +3368,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1C79AE3FBFC91800E30D092C /* CodableIntegrationTests.swift in Sources */,
95ED06D2B0078D3CDB821B68 /* FIRArrayTransformTests.mm in Sources */,
EC160876D8A42166440E0B53 /* FIRCursorTests.mm in Sources */,
EA38690795FBAA182A9AA63E /* FIRDatabaseTests.mm in Sources */,
Expand Down Expand Up @@ -3396,6 +3399,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CF5DE1ED21DD0A9783383A35 /* CodableIntegrationTests.swift in Sources */,
660E99DEDA0A6FC1CCB200F9 /* FIRArrayTransformTests.mm in Sources */,
A55266E6C986251D283CE948 /* FIRCursorTests.mm in Sources */,
7DD67E9621C52B790E844B16 /* FIRDatabaseTests.mm in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions Firestore/Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ target 'Firestore_Example_macOS' do
target 'Firestore_IntegrationTests_macOS' do
inherit! :search_paths

pod 'FirebaseFirestoreSwift', :path => '../../'
pod 'GoogleTest', :podspec => 'GoogleTest.podspec'

pod 'OCMock'
Expand Down Expand Up @@ -123,6 +124,7 @@ target 'Firestore_Example_tvOS' do
target 'Firestore_IntegrationTests_tvOS' do
inherit! :search_paths

pod 'FirebaseFirestoreSwift', :path => '../../'
pod 'GoogleTest', :podspec => 'GoogleTest.podspec'

pod 'OCMock'
Expand Down
3 changes: 2 additions & 1 deletion scripts/sync_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def sync_firestore(test_only)
'Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm',
'Firestore/Example/Tests/Util/XCTestCase+Await.mm',
'Firestore/Example/Tests/en.lproj/InfoPlist.strings',
'Firestore/Swift/Tests/Integration/**',
'Firestore/core/test/firebase/firestore/testutil/**',
]
t.xcconfig = xcconfig_objc + xcconfig_swift
Expand Down Expand Up @@ -318,7 +319,7 @@ def each_target_file(target)

class Syncer
HEADERS = %w{.h}
SOURCES = %w{.c .cc .m .mm}
SOURCES = %w{.c .cc .m .mm .swift}

def initialize(project, root_dir)
@project = project
Expand Down

0 comments on commit 79627a2

Please sign in to comment.