Skip to content

Commit

Permalink
[scan] replace the simctl boot command with simctl bootstatus, po…
Browse files Browse the repository at this point in the history
…tentially fixing signal kill before running tests (#21026)
  • Loading branch information
testableapple committed Dec 12, 2023
1 parent f648513 commit 7da098f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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

0 comments on commit 7da098f

Please sign in to comment.