lib/calabash-android/operations.rb in calabash-android-0.9.4 vs lib/calabash-android/operations.rb in calabash-android-0.9.5
- old
+ new
@@ -761,12 +761,10 @@
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
- log "Checking client-server version match..."
-
begin
server_version = server_version()
rescue
msg = ["Unable to obtain Test Server version. "]
msg << "Please run 'reinstall_test_server' to make sure you have the correct version"
@@ -775,22 +773,36 @@
raise msg_s
end
client_version = client_version()
- unless server_version == client_version
- msg = ["Calabash Client and Test-server version mismatch."]
- msg << "Client version #{client_version}"
- msg << "Test-server version #{server_version}"
- msg << "Expected Test-server version #{client_version}"
- msg << "\n\nSolution:\n\n"
- msg << "Run 'reinstall_test_server' to make sure you have the correct version"
- msg_s = msg.join("\n")
- log(msg_s)
- raise msg_s
- end
+ if Calabash::Android::Environment.skip_version_check?
+ log(%Q[
+ Client version #{client_version}
+Test-server version #{server_version}
- log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
+])
+ $stdout.flush
+ else
+ log "Checking client-server version match..."
+
+ if server_version != client_version
+ raise(%Q[
+Calabash Client and Test-server version mismatch.
+
+ Client version #{client_version}
+ Test-server version #{server_version}
+Expected Test-server version #{client_version}
+
+Solution:
+
+Run 'reinstall_test_server' to make sure you have the correct version
+
+])
+ else
+ log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
+ end
+ end
block.call if block
start_application(options[:intent])