From 89fac463d07e258425cb48df94d2d1c7155aac6e Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Mon, 1 Jul 2019 22:26:03 -0700 Subject: [PATCH 01/13] Manage configuration for Benchmarks and FuzzTests --- scripts/sync_project.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/sync_project.rb b/scripts/sync_project.rb index 6040522a81f..3d0e763fc17 100755 --- a/scripts/sync_project.rb +++ b/scripts/sync_project.rb @@ -188,6 +188,23 @@ def sync_firestore(test_only) t.xcconfig = xcconfig_objc + xcconfig_swift end + s.target 'Firestore_Benchmarks_iOS' do |t| + t.xcconfig = xcconfig_objc + { + 'INFOPLIST_FILE' => '${SRCROOT}/Benchmarks/Info.plist', + } + end + + s.target 'Firestore_FuzzTests_iOS' do |t| + t.xcconfig = xcconfig_objc + { + 'INFOPLIST_FILE' => + '${SRCROOT}/FuzzTests/Firestore_FuzzTests_iOS-Info.plist', + 'OTHER_CFLAGS' => [ + '-fsanitize-coverage=trace-pc-guard', + ] + } + + end + s.target 'Firestore_SwiftTests_iOS' do |t| t.xcconfig = xcconfig_objc + xcconfig_swift end From d1ab9a2f62301da3823d0964b930955f6adc24d9 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Mon, 1 Jul 2019 22:26:24 -0700 Subject: [PATCH 02/13] Suppress warnings in LibFuzzer --- Firestore/Example/Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index 46244578cbb..bbd09d3fa58 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -65,7 +65,7 @@ target 'Firestore_Example_iOS' do inherit! :search_paths platform :ios, '9.0' - pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec' + pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec', :inhibit_warnings => true pod '!ProtoCompiler' end end From b9c7ea3c8b6d92a9194eea0c75470a38b082a790 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Tue, 2 Jul 2019 00:02:51 -0700 Subject: [PATCH 03/13] Add a Firestore_Benchmarks_iOS scheme --- .../Firestore_Benchmarks_iOS.xcscheme | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Benchmarks_iOS.xcscheme diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Benchmarks_iOS.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Benchmarks_iOS.xcscheme new file mode 100644 index 00000000000..bb91b01f134 --- /dev/null +++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Benchmarks_iOS.xcscheme @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 23418db4292fbee1cb719d31c57d6f0870116697 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Sun, 30 Jun 2019 10:46:06 -0700 Subject: [PATCH 04/13] Fix leveldb benchmarks ... which apparently haven't been built in a while --- .../Benchmarks/FSTLevelDBBenchmarkTests.mm | 46 ++++++++----------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm index 59d4f219d44..76340aa9cc4 100644 --- a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm +++ b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm @@ -27,11 +27,15 @@ #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" +#include "Firestore/core/src/firebase/firestore/util/filesystem.h" +#include "Firestore/core/src/firebase/firestore/util/path.h" #include "Firestore/core/src/firebase/firestore/util/string_format.h" #include "benchmark/benchmark.h" NS_ASSUME_NONNULL_BEGIN +namespace util = firebase::firestore::util; +using firebase::firestore::local::LevelDbDocumentTargetKey; using firebase::firestore::local::LevelDbRemoteDocumentKey; using firebase::firestore::local::LevelDbTargetDocumentKey; using firebase::firestore::local::LevelDbTransaction; @@ -39,6 +43,7 @@ using firebase::firestore::model::DocumentKey; using firebase::firestore::model::TargetId; using firebase::firestore::util::StringFormat; +using firebase::firestore::util::Path; namespace { @@ -53,33 +58,21 @@ return std::string(documentSize, 'b'); } -NSString *LevelDBDir() { - NSFileManager *files = [NSFileManager defaultManager]; - NSString *dir = - [NSTemporaryDirectory() stringByAppendingPathComponent:@"FSTPersistenceTestHelpers"]; - if ([files fileExistsAtPath:dir]) { - // Delete the directory first to ensure isolation between runs. - NSError *error; - BOOL success = [files removeItemAtPath:dir error:&error]; - if (!success) { - [NSException raise:NSInternalInconsistencyException - format:@"Failed to clean up leveldb path %@: %@", dir, error]; - } - } - return dir; -} - FSTLevelDB *LevelDBPersistence() { - NSString *dir = LevelDBDir(); - auto remoteSerializer = [[FSTSerializerBeta alloc] initWithDatabaseID:DatabaseId("p", "d")]; - auto serializer = [[FSTLocalSerializer alloc] initWithRemoteSerializer:remoteSerializer]; - auto db = [[FSTLevelDB alloc] initWithDirectory:dir serializer:serializer]; - - NSError *error; - BOOL success = [db start:&error]; - if (!success) { + DatabaseId db_id("p", "d"); + Path path = util::TempDir().AppendUtf8("FSTLevelDBBenchmarkTests"); + + FSTSerializerBeta *remoteSerializer = [[FSTSerializerBeta alloc] initWithDatabaseID:db_id]; + FSTLocalSerializer *serializer = + [[FSTLocalSerializer alloc] initWithRemoteSerializer:remoteSerializer]; + FSTLevelDB *db; + util::Status status = [FSTLevelDB dbWithDirectory:std::move(path) + serializer:serializer + lruParams:local::LruParams::Disabled() + ptr:&db]; + if (!status.ok()) { [NSException raise:NSInternalInconsistencyException - format:@"Failed to create leveldb path %@: %@", dir, error]; + format:@"Failed to open DB: %s", status.ToString().c_str()]; } return db; @@ -94,6 +87,7 @@ void SetUp(benchmark::State &state) override { } void TearDown(benchmark::State &state) override { + [db_ shutdown]; db_ = nil; } @@ -133,7 +127,7 @@ void WriteIndex(LevelDbTransaction *txn, const DocumentKey &docKey) { int64_t documentSize = state.range(1); int64_t docsToUpdate = state.range(2); std::string documentUpdate = UpdatedDocumentData(documentSize); - for (const auto &_ : state) { + for (auto _ : state) { LevelDbTransaction txn(db_.ptr, "benchmark"); for (int i = 0; i < docsToUpdate; i++) { auto docKey = DocumentKey::FromPathString(StringFormat("docs/doc_%i", i)); From 503aa1f55b4f8c9994df33e9b7bcd647c7e9a864 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Wed, 10 Jul 2019 07:37:40 -0700 Subject: [PATCH 05/13] xcodeproj: Remove manual configuration for Fuzzer and Benchmarks --- .../Firestore.xcodeproj/project.pbxproj | 114 ------------------ 1 file changed, 114 deletions(-) diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 2f842e003d8..638c0dd74ea 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -4107,55 +4107,8 @@ DEVELOPMENT_TEAM = EQHXZ8M8AV; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = Benchmarks/Info.plist; - OTHER_CFLAGS = ( - "$(inherited)", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleTest/GoogleTest.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/ProtobufCpp/ProtobufCpp.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"", - "$(inherited)", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL/openssl.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseAuth/FirebaseAuth.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/FirebaseFirestore.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/Firebase\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"", - "-DPB_FIELD_32BIT", - "-DPB_NO_PACKED_STRUCTS=1", - ); PRODUCT_BUNDLE_IDENTIFIER = "Firebase.Firestore-Benchmarks-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; - SYSTEM_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/nanopb\""; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS"; }; name = Debug; @@ -4168,55 +4121,8 @@ DEVELOPMENT_TEAM = EQHXZ8M8AV; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = Benchmarks/Info.plist; - OTHER_CFLAGS = ( - "$(inherited)", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleTest/GoogleTest.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/ProtobufCpp/ProtobufCpp.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"", - "$(inherited)", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL/openssl.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseAuth/FirebaseAuth.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/FirebaseFirestore.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"", - "-iquote", - "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/Firebase\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"", - "-isystem", - "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"", - "-DPB_FIELD_32BIT", - "-DPB_NO_PACKED_STRUCTS=1", - ); PRODUCT_BUNDLE_IDENTIFIER = "Firebase.Firestore-Benchmarks-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; - SYSTEM_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/nanopb\""; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS"; }; name = Release; @@ -4501,16 +4407,6 @@ DEVELOPMENT_TEAM = EQHXZ8M8AV; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = "FuzzTests/Firestore_FuzzTests_iOS-Info.plist"; - OTHER_CFLAGS = ( - "$(inherited)", - "-fsanitize-coverage=trace-pc-guard", - ); PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS"; @@ -4526,16 +4422,6 @@ DEVELOPMENT_TEAM = EQHXZ8M8AV; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = "FuzzTests/Firestore_FuzzTests_iOS-Info.plist"; - OTHER_CFLAGS = ( - "$(inherited)", - "-fsanitize-coverage=trace-pc-guard", - ); PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS"; From 306a541616b7b564565f3a4768ac10999f2fe6d5 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Wed, 10 Jul 2019 07:53:22 -0700 Subject: [PATCH 06/13] Update LibFuzzer build for recent clangs Builds are currently failing with this on standard out: -fsanitize-coverage=trace-pc-guard is no longer supported by libFuzzer. Please either migrate to a compiler that supports -fsanitize=fuzzer or use an older version of libFuzzer --- scripts/sync_project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sync_project.rb b/scripts/sync_project.rb index 3d0e763fc17..d4efffc1b0c 100755 --- a/scripts/sync_project.rb +++ b/scripts/sync_project.rb @@ -199,7 +199,7 @@ def sync_firestore(test_only) 'INFOPLIST_FILE' => '${SRCROOT}/FuzzTests/Firestore_FuzzTests_iOS-Info.plist', 'OTHER_CFLAGS' => [ - '-fsanitize-coverage=trace-pc-guard', + '-fsanitize=fuzzer', ] } From 87293417e040dca8c796c01d69dfd74c156e6358 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Sun, 30 Jun 2019 11:47:04 -0700 Subject: [PATCH 07/13] Add deployment_targets for macOS and tvOS in FirebaseFirestoreSwift --- FirebaseFirestoreSwift.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FirebaseFirestoreSwift.podspec b/FirebaseFirestoreSwift.podspec index 684307065f7..048d8c7e3ab 100644 --- a/FirebaseFirestoreSwift.podspec +++ b/FirebaseFirestoreSwift.podspec @@ -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 From 6cfa812a75856e7015fc3774a072f309b0820160 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Sun, 30 Jun 2019 11:47:55 -0700 Subject: [PATCH 08/13] Add FirebaseFirestoreSwift as a dependency to all integration tests --- Firestore/Example/Podfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index bbd09d3fa58..78c896f71fe 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -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' @@ -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' From 2a773406fe8873ec62f7864fb5e6efefb6e6212a Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Tue, 2 Jul 2019 15:42:20 -0700 Subject: [PATCH 09/13] Add swift integration tests to sync_project.rb --- scripts/sync_project.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/sync_project.rb b/scripts/sync_project.rb index d4efffc1b0c..01710141cc6 100755 --- a/scripts/sync_project.rb +++ b/scripts/sync_project.rb @@ -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 @@ -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 From 404bce9edc71607b2e8067fba028e6725417598c Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Thu, 11 Jul 2019 08:38:13 -0700 Subject: [PATCH 10/13] sync_project.rb generated changes --- Firestore/Example/Firestore.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 638c0dd74ea..ed77561d395 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -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 */; }; @@ -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 */; }; @@ -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 */, @@ -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 */, From de2c9e2f04e25f96128051c10aa1fa0d6a0ceee9 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Thu, 11 Jul 2019 11:30:45 -0700 Subject: [PATCH 11/13] Temporarily allow travis to test this branch --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 301c8d6816e..098e7fd9d7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -432,3 +432,4 @@ jobs: branches: only: - master + - wilhuff/swift-integration From 94190618f4d171d078cb453dfe1897bc232c1f9a Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Thu, 11 Jul 2019 14:14:50 -0700 Subject: [PATCH 12/13] Review feedback --- Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm index 76340aa9cc4..73d684672c8 100644 --- a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm +++ b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm @@ -60,12 +60,11 @@ FSTLevelDB *LevelDBPersistence() { DatabaseId db_id("p", "d"); - Path path = util::TempDir().AppendUtf8("FSTLevelDBBenchmarkTests"); + auto remoteSerializer = [[FSTSerializerBeta alloc] initWithDatabaseID:db_id]; + auto serializer = [[FSTLocalSerializer alloc] initWithRemoteSerializer:remoteSerializer]; - FSTSerializerBeta *remoteSerializer = [[FSTSerializerBeta alloc] initWithDatabaseID:db_id]; - FSTLocalSerializer *serializer = - [[FSTLocalSerializer alloc] initWithRemoteSerializer:remoteSerializer]; FSTLevelDB *db; + Path path = util::TempDir().AppendUtf8("FSTLevelDBBenchmarkTests"); util::Status status = [FSTLevelDB dbWithDirectory:std::move(path) serializer:serializer lruParams:local::LruParams::Disabled() From 1febaf7a13ff1b3937fe576366c1dc9a6147ed42 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Thu, 11 Jul 2019 17:24:20 -0700 Subject: [PATCH 13/13] Revert "Temporarily allow travis to test this branch" This reverts commit de2c9e2f04e25f96128051c10aa1fa0d6a0ceee9. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 098e7fd9d7a..301c8d6816e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -432,4 +432,3 @@ jobs: branches: only: - master - - wilhuff/swift-integration