Skip to content

Commit dc05755

Browse files
authored
Add test coverage to podspecs. (#7228)
1 parent 6ffc845 commit dc05755

22 files changed

+39
-1
lines changed

FirebaseABTesting.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Firebase Cloud Messaging and Firebase Remote Config in your app.
4343
s.dependency 'FirebaseCore', '~> 7.0'
4444

4545
s.test_spec 'unit' do |unit_tests|
46+
unit_tests.scheme = { :code_coverage => true }
4647
unit_tests.source_files = 'FirebaseABTesting/Tests/Unit/**/*.[mh]'
4748
unit_tests.resources = 'FirebaseABTesting/Tests/Unit/Resources/*.txt'
4849
unit_tests.requires_app_host = true

FirebaseAppDistribution.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ iOS SDK for App Distribution for Firebase.
4141
}
4242

4343
s.test_spec 'unit' do |unit_tests|
44+
unit_tests.scheme = { :code_coverage => true }
4445
unit_tests.source_files = 'FirebaseAppDistribution/Tests/Unit*/*.[mh]'
4546
unit_tests.resources = 'FirebaseAppDistribution/Tests/Unit/Resources/*'
4647
unit_tests.dependency 'OCMock'

FirebaseAuth.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ supports email and password accounts, as well as several 3rd party authenticatio
4949
s.dependency 'GTMSessionFetcher/Core', '~> 1.4'
5050

5151
s.test_spec 'unit' do |unit_tests|
52+
unit_tests.scheme = { :code_coverage => true }
5253
# Unit tests can't run on watchOS.
5354
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
5455
unit_tests.source_files = 'FirebaseAuth/Tests/Unit/*.[mh]'

FirebaseCore.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
5656
'OTHER_CFLAGS' => '-fno-autolink'
5757
}
5858
s.test_spec 'unit' do |unit_tests|
59+
unit_tests.scheme = { :code_coverage => true }
5960
unit_tests.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
6061
unit_tests.source_files = [
6162
'FirebaseCore/Tests/Unit/**/*.[mh]',

FirebaseCoreDiagnostics.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ non-Cocoapod integration. This library also respects the Firebase global data co
6363
s.dependency 'nanopb', '~> 2.30907.0'
6464

6565
s.test_spec 'unit' do |unit_tests|
66+
unit_tests.scheme = { :code_coverage => true }
6667
unit_tests.platforms = {
6768
:ios => ios_deployment_target,
6869
:osx => osx_deployment_target,

FirebaseCrashlytics.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Pod::Spec.new do |s|
9797
}
9898

9999
s.test_spec 'unit' do |unit_tests|
100+
unit_tests.scheme = { :code_coverage => true }
100101
# Unit tests can't run on watchOS.
101102
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
102103
unit_tests.source_files = 'Crashlytics/UnitTests/*.[mh]',

FirebaseDatabase.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
4242
}
4343

4444
s.test_spec 'unit' do |unit_tests|
45+
unit_tests.scheme = { :code_coverage => true }
4546
unit_tests.source_files = [
4647
'FirebaseDatabase/Tests/Unit/*.[mh]',
4748
'FirebaseDatabase/Tests/Helpers/*.[mh]',
@@ -56,6 +57,7 @@ Simplify your iOS development, grow your user base, and monetize more effectivel
5657
end
5758

5859
s.test_spec 'integration' do |int_tests|
60+
int_tests.scheme = { :code_coverage => true }
5961
int_tests.source_files = [
6062
'FirebaseDatabase/Tests/Integration/*.[mh]',
6163
'FirebaseDatabase/Tests/Helpers/*.[mh]',

FirebaseDynamicLinks.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Firebase Dynamic Links are deep links that enhance user experience and increase
3838
}
3939

4040
s.test_spec 'unit' do |unit_tests|
41+
unit_tests.scheme = { :code_coverage => true }
4142
unit_tests.source_files = [
4243
'FirebaseDynamicLinks/Tests/Unit/*.[mh]',
4344
]

FirebaseFunctions.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Cloud Functions for Firebase.
3939
}
4040

4141
s.test_spec 'unit' do |unit_tests|
42+
unit_tests.scheme = { :code_coverage => true }
4243
unit_tests.source_files = [
4344
'Functions/Example/Test*/*.[mh]',
4445
'SharedTestUtilities/FIRAuthInteropFake*',
@@ -47,6 +48,7 @@ Cloud Functions for Firebase.
4748
end
4849

4950
s.test_spec 'integration' do |int_tests|
51+
int_tests.scheme = { :code_coverage => true }
5052
int_tests.source_files = 'Functions/Example/IntegrationTests/*.[mh]',
5153
'Functions/Example/TestUtils/*.[mh]',
5254
'SharedTestUtilities/FIRAuthInteropFake*',

FirebaseInAppMessaging.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ See more product details at https://firebase.google.com/products/in-app-messagin
8989
s.dependency 'nanopb', '~> 2.30907.0'
9090

9191
s.test_spec 'unit' do |unit_tests|
92+
unit_tests.scheme = { :code_coverage => true }
9293
unit_tests.source_files = 'FirebaseInAppMessaging/Tests/Unit/*.[mh]'
9394
unit_tests.resources = 'FirebaseInAppMessaging/Tests/Unit/*.txt'
9495
unit_tests.requires_app_host = true
9596
unit_tests.dependency 'OCMock'
9697
end
97-
end
98+
end

FirebaseInstallations.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Pod::Spec.new do |s|
5151
}
5252

5353
s.test_spec 'unit' do |unit_tests|
54+
unit_tests.scheme = { :code_coverage => true }
5455
unit_tests.platforms = {:ios => '9.0', :osx => '10.12', :tvos => '10.0'}
5556
unit_tests.source_files = base_dir + 'Tests/Unit/*.[mh]',
5657
base_dir + 'Tests/Utils/*.[mh]'
@@ -65,6 +66,7 @@ Pod::Spec.new do |s|
6566
end
6667

6768
s.test_spec 'integration' do |int_tests|
69+
int_tests.scheme = { :code_coverage => true }
6870
int_tests.platforms = {:ios => '9.0', :osx => '10.12', :tvos => '10.0'}
6971
int_tests.source_files = base_dir + 'Tests/Integration/**/*.[mh]'
7072
int_tests.resources = base_dir + 'Tests/Resources/**/*'

FirebaseInstanceID.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ services.
4545
s.dependency 'GoogleUtilities/Environment', '~> 7.0'
4646

4747
s.test_spec 'unit' do |unit_tests|
48+
unit_tests.scheme = { :code_coverage => true }
4849
unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
4950
unit_tests.source_files = 'Example/InstanceID/Tests/*.[mh]'
5051
unit_tests.requires_app_host = true
@@ -60,6 +61,7 @@ services.
6061
end
6162

6263
s.test_spec 'integration' do |int_tests|
64+
int_tests.scheme = { :code_coverage => true }
6365
int_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
6466
int_tests.source_files = 'Example/InstanceID/IntegrationTests/*.[mh]'
6567
int_tests.resources = 'Example/InstanceID/Resources/**/*'

FirebaseMLModelDownloader.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ Pod::Spec.new do |s|
4141
}
4242

4343
s.test_spec 'unit' do |unit_tests|
44+
unit_tests.scheme = { :code_coverage => true }
4445
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
4546
unit_tests.source_files = 'FirebaseMLModelDownloader/Tests/Unit/**/*.swift'
4647
unit_tests.requires_app_host = true
4748
end
4849

4950
s.test_spec 'integration' do |int_tests|
51+
int_tests.scheme = { :code_coverage => true }
5052
int_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
5153
int_tests.source_files = 'FirebaseMLModelDownloader/Tests/Integration/**/*.swift'
5254
int_tests.resources = 'FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist'

FirebaseMessaging.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ device, and it is completely free.
5656
s.dependency 'GoogleUtilities/UserDefaults', '~> 7.0'
5757

5858
s.test_spec 'unit' do |unit_tests|
59+
unit_tests.scheme = { :code_coverage => true }
5960
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
6061
unit_tests.source_files = 'FirebaseMessaging/Tests/UnitTests*/*.{m,h,swift}'
6162
unit_tests.requires_app_host = true
@@ -66,6 +67,7 @@ device, and it is completely free.
6667
end
6768

6869
s.test_spec 'integration' do |int_tests|
70+
int_tests.scheme = { :code_coverage => true }
6971
int_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
7072
int_tests.source_files = 'FirebaseMessaging/Tests/IntegrationTests/*.swift'
7173
int_tests.requires_app_host = true

FirebasePerformance.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Firebase Performance library to measure performance of Mobile and Web Apps.
6868
s.dependency 'Protobuf', '~> 3.12'
6969

7070
s.test_spec 'unit' do |unit_tests|
71+
unit_tests.scheme = { :code_coverage => true }
7172
unit_tests.platforms = {:ios => '10.0'}
7273
unit_tests.source_files = [
7374
'FirebasePerformance/Tests/Unit/**/*.{m,h,plist}',

FirebaseRemoteConfig.podspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ app update.
4545
s.dependency 'GoogleUtilities/NSData+zlib', '~> 7.0'
4646

4747
s.test_spec 'unit' do |unit_tests|
48+
unit_tests.scheme = { :code_coverage => true }
4849
# TODO(dmandar) - Update or delete the commented files.
4950
unit_tests.source_files =
5051
'FirebaseRemoteConfig/Tests/Unit/FIRRemoteConfigComponentTest.m',
@@ -74,6 +75,7 @@ app update.
7475

7576
# Run Swift API tests on a real backend.
7677
s.test_spec 'swift-api-tests' do |swift_api|
78+
swift_api.scheme = { :code_coverage => true }
7779
swift_api.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
7880
swift_api.source_files = 'FirebaseRemoteConfig/Tests/SwiftAPI/*.swift',
7981
'FirebaseRemoteConfig/Tests/FakeUtils/*.[hm]',
@@ -89,6 +91,7 @@ app update.
8991

9092
# Run Swift API tests and tests requiring console changes on a Fake Console.
9193
s.test_spec 'fake-console-tests' do |fake_console|
94+
fake_console.scheme = { :code_coverage => true }
9295
fake_console.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
9396
fake_console.source_files = 'FirebaseRemoteConfig/Tests/SwiftAPI/*.swift',
9497
'FirebaseRemoteConfig/Tests/FakeUtils/*.[hm]',

FirebaseSegmentation.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Firebase Segmentation enables you to associate your custom application instance
4040
}.merge(header_search_paths)
4141

4242
s.test_spec 'unit' do |unit_tests|
43+
unit_tests.scheme = { :code_coverage => true }
4344
unit_tests.source_files = 'FirebaseSegmentation/Tests/Unit/*.[mh]'
4445
unit_tests.dependency 'OCMock'
4546
unit_tests.requires_app_host = true

FirebaseStorage.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
4141
}
4242

4343
s.test_spec 'unit' do |unit_tests|
44+
unit_tests.scheme = { :code_coverage => true }
4445
unit_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
4546
unit_tests.source_files = 'FirebaseStorage/Tests/Unit/*.[mh]',
4647
'SharedTestUtilities/FIRComponentTestUtilities.*',
@@ -49,6 +50,7 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
4950
end
5051

5152
s.test_spec 'integration' do |int_tests|
53+
int_tests.scheme = { :code_coverage => true }
5254
int_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
5355
int_tests.source_files = 'FirebaseStorage/Tests/Integration/*.[mh]'
5456
int_tests.requires_app_host = true

FirebaseStorageSwift.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
3333
s.dependency 'FirebaseStorage', '~> 7.0'
3434

3535
s.test_spec 'integration' do |int_tests|
36+
int_tests.scheme = { :code_coverage => true }
3637
int_tests.platforms = {:ios => '10.0', :osx => '10.12', :tvos => '10.0'}
3738
int_tests.source_files = 'FirebaseStorageSwift/Tests/Integration/*.swift'
3839
int_tests.requires_app_host = true

GoogleDataTransport.podspec

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ Shared library for iOS SDK data transport needs.
8787

8888
# Unit test specs
8989
s.test_spec 'Tests-Unit' do |test_spec|
90+
test_spec.scheme = { :code_coverage => true }
9091
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
9192
test_spec.requires_app_host = false
9293
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
9394
test_spec.pod_target_xcconfig = header_search_paths
9495
end
9596

9697
s.test_spec 'Tests-Lifecycle' do |test_spec|
98+
test_spec.scheme = { :code_coverage => true }
9799
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
98100
test_spec.requires_app_host = false
99101
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
@@ -102,6 +104,7 @@ Shared library for iOS SDK data transport needs.
102104

103105
# Integration test specs
104106
s.test_spec 'Tests-Integration' do |test_spec|
107+
test_spec.scheme = { :code_coverage => true }
105108
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
106109
test_spec.requires_app_host = false
107110
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
@@ -112,6 +115,7 @@ Shared library for iOS SDK data transport needs.
112115
# Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
113116
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
114117
s.test_spec 'Tests-Monkey' do |test_spec|
118+
test_spec.scheme = { :code_coverage => true }
115119
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
116120
test_spec.requires_app_host = true
117121
test_spec.app_host_name = 'GoogleDataTransport/TestApp'
@@ -144,6 +148,7 @@ Shared library for iOS SDK data transport needs.
144148

145149
# Test specs
146150
s.test_spec 'CCT-Tests-Unit' do |test_spec|
151+
test_spec.scheme = { :code_coverage => true }
147152
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
148153
test_spec.requires_app_host = false
149154
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
@@ -153,6 +158,7 @@ Shared library for iOS SDK data transport needs.
153158
end
154159

155160
s.test_spec 'CCT-Tests-Integration' do |test_spec|
161+
test_spec.scheme = { :code_coverage => true }
156162
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
157163
test_spec.requires_app_host = false
158164
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}'] + common_cct_test_sources
@@ -163,6 +169,7 @@ Shared library for iOS SDK data transport needs.
163169
# Monkey test specs, only enabled for development.
164170
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
165171
s.test_spec 'CCT-Tests-Monkey' do |test_spec|
172+
test_spec.scheme = { :code_coverage => true }
166173
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
167174
test_spec.requires_app_host = true
168175
test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'

GoogleUtilities.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ other Google CocoaPods. They're not intended for direct public usage.
116116
end
117117

118118
s.test_spec 'unit' do |unit_tests|
119+
unit_tests.scheme = { :code_coverage => true }
119120
# All tests require arc except Tests/Network/third_party/GTMHTTPServer.m
120121
unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
121122
unit_tests.source_files = [
@@ -128,6 +129,7 @@ other Google CocoaPods. They're not intended for direct public usage.
128129
end
129130

130131
s.test_spec 'unit-swift' do |unit_tests_swift|
132+
unit_tests_swift.scheme = { :code_coverage => true }
131133
unit_tests_swift.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
132134
unit_tests_swift.source_files = 'GoogleUtilities/Tests/SwiftUnit/**/*.swift',
133135
'GoogleUtilities/Tests/SwiftUnit/**/*.h'

GoogleUtilitiesComponents.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Not intended for direct public usage.
3131
s.dependency 'GoogleUtilities/Logger'
3232

3333
s.test_spec 'unit' do |unit_tests|
34+
unit_tests.scheme = { :code_coverage => true }
3435
unit_tests.source_files = 'GoogleUtilitiesComponents/Tests/**/*.[mh]'
3536
unit_tests.requires_arc = 'GoogleUtilitiesComponents/Tests/*/*.[mh]'
3637
unit_tests.requires_app_host = true

0 commit comments

Comments
 (0)