Skip to content

Commit 6e5f02d

Browse files
GDT: test app fixes (#6897)
* Add bridging header to GDTTestApp to expose private API * Update OS versions of test apps * Use spec OS vesrions for tests and apps * Use local variables for deployment targets
1 parent 1adc4a1 commit 6e5f02d

File tree

2 files changed

+34
-13
lines changed

2 files changed

+34
-13
lines changed

GoogleDataTransport.podspec

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ Shared library for iOS SDK data transport needs.
1515
:tag => 'DataTransport-' + s.version.to_s
1616
}
1717

18-
s.ios.deployment_target = '9.0'
19-
s.osx.deployment_target = '10.12'
20-
s.tvos.deployment_target = '10.0'
21-
s.watchos.deployment_target = '6.0'
18+
ios_deployment_target = '9.0'
19+
osx_deployment_target = '10.12'
20+
tvos_deployment_target = '10.0'
21+
watchos_deployment_target = '6.0'
22+
23+
s.ios.deployment_target = ios_deployment_target
24+
s.osx.deployment_target = osx_deployment_target
25+
s.tvos.deployment_target = tvos_deployment_target
26+
s.watchos.deployment_target = watchos_deployment_target
2227

2328
# To develop or run the tests, >= 1.8.0 must be installed.
2429
s.cocoapods_version = '>= 1.4.0'
@@ -55,7 +60,7 @@ Shared library for iOS SDK data transport needs.
5560
# Test app specs
5661
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
5762
s.app_spec 'TestApp' do |app_spec|
58-
app_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
63+
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
5964
app_spec.source_files = [
6065
'GoogleDataTransport/GDTTestApp/*.swift',
6166
'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h',
@@ -80,22 +85,22 @@ Shared library for iOS SDK data transport needs.
8085

8186
# Unit test specs
8287
s.test_spec 'Tests-Unit' do |test_spec|
83-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
88+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
8489
test_spec.requires_app_host = false
8590
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
8691
test_spec.pod_target_xcconfig = header_search_paths
8792
end
8893

8994
s.test_spec 'Tests-Lifecycle' do |test_spec|
90-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
95+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
9196
test_spec.requires_app_host = false
9297
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
9398
test_spec.pod_target_xcconfig = header_search_paths
9499
end
95100

96101
# Integration test specs
97102
s.test_spec 'Tests-Integration' do |test_spec|
98-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
103+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
99104
test_spec.requires_app_host = false
100105
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
101106
test_spec.pod_target_xcconfig = header_search_paths
@@ -105,7 +110,7 @@ Shared library for iOS SDK data transport needs.
105110
# Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
106111
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
107112
s.test_spec 'Tests-Monkey' do |test_spec|
108-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
113+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
109114
test_spec.requires_app_host = true
110115
test_spec.app_host_name = 'GoogleDataTransport/TestApp'
111116
test_spec.dependency 'GoogleDataTransport/TestApp'
@@ -119,7 +124,7 @@ Shared library for iOS SDK data transport needs.
119124
# CCT Tests follow
120125
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
121126
s.app_spec 'CCTTestApp' do |app_spec|
122-
app_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
127+
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
123128
app_spec.source_files = 'GoogleDataTransport/GDTCCTTestApp/**/*.swift'
124129
app_spec.ios.resources = ['GoogleDataTransport/GDTCCTTestApp/ios/*.storyboard']
125130
app_spec.macos.resources = ['GoogleDataTransport/GDTCCTTestApp/macos/*.storyboard']
@@ -137,7 +142,7 @@ Shared library for iOS SDK data transport needs.
137142

138143
# Test specs
139144
s.test_spec 'CCT-Tests-Unit' do |test_spec|
140-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
145+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
141146
test_spec.requires_app_host = false
142147
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
143148
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
@@ -146,7 +151,7 @@ Shared library for iOS SDK data transport needs.
146151
end
147152

148153
s.test_spec 'CCT-Tests-Integration' do |test_spec|
149-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
154+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
150155
test_spec.requires_app_host = false
151156
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}'] + common_cct_test_sources
152157
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
@@ -156,7 +161,7 @@ Shared library for iOS SDK data transport needs.
156161
# Monkey test specs, only enabled for development.
157162
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
158163
s.test_spec 'CCT-Tests-Monkey' do |test_spec|
159-
test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
164+
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
160165
test_spec.requires_app_host = true
161166
test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'
162167
test_spec.dependency 'GoogleDataTransport/CCTTestApp'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORUploader.h"
16+
#import "GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadCoordinator.h"

0 commit comments

Comments
 (0)