Skip to content

Commit

Permalink
Merge pull request #596 from calabash/release/2.3.0
Browse files Browse the repository at this point in the history
release/2.3.0
  • Loading branch information
jmoody authored Feb 3, 2017
2 parents 1d8f1d5 + 17619a3 commit 42f3191
Show file tree
Hide file tree
Showing 40 changed files with 1,218 additions and 747 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ before_script:
script:
- scripts/ci/travis/install-gem-ci.rb
- scripts/ci/travis/rspec-ci.rb
- bundle exec rspec spec/integration/detect_simulators_spec.rb
- bundle exec rspec spec/integration/simctl_spec.rb

rvm:
- 2.0.0
- 2.1.9
- 2.2.5
- 2.3.1

notifications:
email:
Expand Down
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
## Change Log

### 2.3.0

This release contains a significant change - Simulators will not be
automatically be relaunched whenever
`Calabash::Cucumber::Launcher#relaunch` is called. Instead, run-loop
will try to keep the simulator running as long as it appears to be
health. This change is only for DeviceAgent test runs. Tests that use
UIAutomation will continue to relaunch the simulator.

If you are on macOS Sierra or using Xcode >= 8.0, you are running
against DeviceAgent. UIAutomation is only used on El Cap with Xcode <
8.0 and iOS < 10.

If your tests need the simulator to relaunch every time
`Launcher#relaunch` is called, you can pass the new `:relaunch_simulator =>
true` option. This option is provided for backward compatibility.

* Improve Device#simulator\_wait\_for\_stable\_state for iOS <= 8 and iOS >= 10.1 #594
* CoreSimulator manages more processes for Xcode 8 and Sierra #593
* Stabilize integration tests for Xcode 8.2 #592
* Allow user to force simulator relaunch when running with DeviceAgent #591
* CoreSimulator relaunches the simulator if app state is not acceptable #590
* Use iOSDeviceManager arguments that are 1.0.4 and 1.0.5 compatible #589
* DA:Client: use a separate timeout for entering text #588
* DeviceAgent#Client: check if running DeviceAgent is stale #587
* Decouple simulator wait for stable state and CoreSim install and uninstall #586
* Add nl\_BE and Swedish localizations for privacy alerts #585
* Update iOSDeviceManager arguments for 1.0.5 #584
* Device: improve the wait-for-simulator-stable algorithm #582
* ProcessWaiter: improve process detection #581
* CoreSim: quit simulator only when necessary #580
* DeviceAgent::Client: check simulator/application architecture compatibility #579
* Stabilize integration tests for Xcode 8 #578
* OSS: update vendor licenses #576

#### DeviceAgent 1.0.6

DeviceAgent 1.0.5 was skipped.

Built from tag [1.0.6](https://github.com/calabash/DeviceAgent.iOS/releases/tag/1.0.6)

* Add mach clock and a simple waiter #202
* SpringBoard#queryForAlert: skip\_waitForQuiescence check #201
* Increase touch duration to 0.2 to match XCUITest #198
* Use CocoaLumberjack for logging #197
* Update CocoaLumberjack to 3.0.0 #196
* TestApp: update to calabash.framework 0.20.4 #194
* Improve hitpoint and visibility calculation #193
* Fix text entry for i386/armv7 devices #192
* Dismiss SpringBoard alerts by touching alert buttons with coordinates #191
* SpringBoard: ask UIApplication for SpringBoard alert before making an expensive XCUITest query #190
* POST /session raises when app is not installed and when app fails to launch #189

#### iOSDeviceManager 1.0.4

iOSDeviceManager is unchanged for this version. See the 2.2.4 release
notes below for details about the iOSDeviceManager 1.0.4 release.

### 2.2.4

DeviceAgent 1.0.4 can dismiss SpringBoard alerts in any orientation.
Expand Down
13 changes: 3 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,11 @@ Could not find repo #{name}. Checked these two directories:
To specify a non-standard location for these repositories, use:
* FBSIMCONTROL_PATH=path/to/FBSimulatorControl
* DEVICEAGENT_PATH=path/to/DeviceAgent.iOS
* IOS_DEVICE_MANAGER=path/to/iOSDeviceManager
]
end

def fbsimctl
path = ENV["FBSIMCTL"] || expect_path_to_repo("FBSimulatorControl")
log_info "Using FBSIMCONTROL_PATH=#{path}"
path
end

def device_agent
path = ENV["DEVICE_AGENT"] || expect_path_to_repo("DeviceAgent.iOS")
log_info "Using DEVICEAGENT_PATH=#{path}"
Expand Down Expand Up @@ -240,8 +233,8 @@ target = #{target}

ensure_valid_core_simulator_service

env = {"DEVICEAGENT_PATH" => device_agent,
"FBSIMCONTROL_PATH" => fbsimctl}
env = {"DEVICEAGENT_PATH" => device_agent}

Dir.chdir(ios_device_manager) do
result = system(env, "make", "dependencies")
if !result
Expand Down Expand Up @@ -304,7 +297,7 @@ target = #{target}
end
end

desc "Roll back changes to DeviceAgent stack"
desc "Roll back changes to DeviceAgent binaries; does not touch client.rb"
task :checkout do
banner("Git Checkout")
checkout(bin)
Expand Down
9 changes: 9 additions & 0 deletions lib/run_loop/cli/instruments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class Instruments < Thor


def quit
if RunLoop::Xcode.new.version_gte_8?
puts "instruments quit with Xcode 8 is not supported"
exit 1
end

signal = options[:signal]
ENV['DEBUG'] = '1' if options[:debug]
instruments = RunLoop::Instruments.new
Expand Down Expand Up @@ -94,6 +99,10 @@ def quit
:type => :boolean

def launch
if RunLoop::Xcode.new.version_gte_8?
puts "Launching applications with Xcode 8 is not supported"
exit 1
end

debug = options[:debug]
original_value = ENV['DEBUG']
Expand Down
6 changes: 2 additions & 4 deletions lib/run_loop/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -807,22 +807,20 @@ def self.prepare_simulator(app, device, xcode, simctl, reset_options)
# Validate the architecture.
self.expect_simulator_compatible_arch(device, app)

# Quits the simulator.
core_sim = RunLoop::CoreSimulator.new(device, app, :xcode => xcode)
RunLoop::CoreSimulator.quit_simulator
core_sim = RunLoop::CoreSimulator.new(device, app, xcode: xcode)

# Calabash 0.x can only reset the app sandbox (true/false).
# Calabash 2.x has advanced reset options.
if reset_options
core_sim.reset_app_sandbox
end

# Will quit the simulator if it is running.
# @todo fix accessibility_enabled? so we don't have to quit the sim
# SimControl#accessibility_enabled? is always false during Core#prepare_simulator
# https://github.com/calabash/run_loop/issues/167
simctl.ensure_accessibility(device)

# Will quit the simulator if it is running.
# @todo fix software_keyboard_enabled? so we don't have to quit the sim
# SimControl#software_keyboard_enabled? is always false during Core#prepare_simulator
# https://github.com/calabash/run_loop/issues/168
Expand Down
Loading

0 comments on commit 42f3191

Please sign in to comment.