File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Firestore/core/test/unit/local Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ firebase_ios_glob(
42
42
)
43
43
firebase_ios_add_test (firestore_local_test ${sources} )
44
44
45
+ # Set a preprocessor define so that tests can distinguish between having been
46
+ # built by Xcode vs. cmake.
47
+ target_compile_definitions (
48
+ firestore_local_test
49
+ PRIVATE
50
+ FIRESTORE_TESTS_CMAKE_BUILD
51
+ )
52
+
45
53
target_link_libraries (
46
54
firestore_local_test PRIVATE
47
55
GMock::GMock
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ Path CreateLevelDbDatabaseThatUsesSnappyCompression();
43
43
// This test ensures that we don't accidentally regress having added in Snappy
44
44
// compression support (https://github.com/firebase/firebase-ios-sdk/pull/9596).
45
45
TEST (LevelDbSnappy, LevelDbHasSnappySupportCompiledIn) {
46
+ // Only run this test in cmake builds, since Snappy support is not included
47
+ // when pulling in LevelDb via CocoaPods or Swift Package Manager.
48
+ #if FIRESTORE_TESTS_CMAKE_BUILD
49
+ GTEST_SKIP () << " Snappy support is only present in cmake builds" ;
50
+ #endif
51
+
46
52
Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression ();
47
53
if (HasFatalFailure ()) return ;
48
54
You can’t perform that action at this time.
0 commit comments