Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scan] replace the simctl boot command with simctl bootstatus, potentially fixing signal kill before running tests #21026

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions fastlane_core/lib/fastlane_core/device_manager.rb
Expand Up @@ -204,9 +204,9 @@ def boot
return unless os_type == "iOS"
return if self.state == 'Booted'

# Boot the simulator and wait for it to finish booting
UI.message("Booting #{self}")

`xcrun simctl boot #{self.udid} 2>/dev/null`
`xcrun simctl bootstatus #{self.udid} -b &> /dev/null`
self.state = 'Booted'
end

Expand Down
8 changes: 8 additions & 0 deletions fastlane_core/spec/device_manager_spec.rb
Expand Up @@ -512,6 +512,14 @@

device.disable_slide_to_type
end

it "boots the simulator" do
device = FastlaneCore::DeviceManager::Device.new(os_type: "iOS", os_version: "13.0", is_simulator: true, state: nil)

device.boot

expect(device.state).to eq('Booted')
end
end
end
end