Skip to content

Commit afd58d3

Browse files
committed
Don’t run iOS tests on oldest sim
“Early unexpected exit, operation never finished bootstrapping”
1 parent be9fc78 commit afd58d3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Tests/CocoaPods/integration_test.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,32 @@ def test_pod
3939
# https://github.com/CocoaPods/CocoaPods/issues/7009
4040
super unless consumer.platform_name == :watchos
4141
end
42+
43+
def xcodebuild(action, scheme, configuration)
44+
require 'fourflusher'
45+
command = %W(clean #{action} -workspace #{File.join(validation_dir, 'App.xcworkspace')} -scheme #{scheme} -configuration #{configuration})
46+
case consumer.platform_name
47+
when :osx, :macos
48+
command += %w(CODE_SIGN_IDENTITY=)
49+
when :ios
50+
command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
51+
command += Fourflusher::SimControl.new.destination(nil, 'iOS', deployment_target)
52+
when :watchos
53+
command += %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator)
54+
command += Fourflusher::SimControl.new.destination(:oldest, 'watchOS', deployment_target)
55+
when :tvos
56+
command += %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator)
57+
command += Fourflusher::SimControl.new.destination(:oldest, 'tvOS', deployment_target)
58+
end
59+
60+
begin
61+
_xcodebuild(command, true)
62+
rescue => e
63+
message = 'Returned an unsuccessful exit code.'
64+
message += ' You can use `--verbose` for more information.' unless config.verbose?
65+
error('xcodebuild', message)
66+
e.message
67+
end
68+
end
4269
end
4370
end

0 commit comments

Comments
 (0)