lib/calabash-android/operations.rb in calabash-android-0.2.7 vs lib/calabash-android/operations.rb in calabash-android-0.2.8
- old
+ new
@@ -114,21 +114,10 @@
@app_path = app_path
@test_server_path = test_server_path
puts "#{adb_command} forward tcp:b#{server_port} tcp:7102"
log `#{adb_command} forward tcp:#{server_port} tcp:7102`
-=begin
- begin
- Timeout::timeout(15) do
- puts http("/ping")
- end
- rescue Timeout::Error
- msg = "Unable to make connection to Calabash Test Server at http://127.0.0.1:#{@server_port}/\n"
- msg << "Please check the logcat output for more info about what happened\n"
- raise msg
- end
-=end
end
def reinstall_apps()
uninstall_app(package_name(@app_path))
install_app(@app_path)
@@ -242,9 +231,19 @@
log cmd
if is_windows?
system(%Q(start /MIN cmd /C #{cmd}))
else
`#{cmd} 1>&2 &`
+ end
+
+ begin
+ Timeout::timeout(15) do
+ puts http("/ping")
+ end
+ rescue Timeout::Error
+ msg = "Unable to make connection to Calabash Test Server at http://127.0.0.1:#{@server_port}/\n"
+ msg << "Please check the logcat output for more info about what happened\n"
+ raise msg
end
end
def log(message)
$stdout.puts "#{Time.now.strftime("%Y-%m-%d %H:%M:%S")} - #{message}" if (ARGV.include? "-v" or ARGV.include? "--verbose")