mirror of
https://github.com/appium/appium.git
synced 2026-04-25 21:08:57 -05:00
fail with an error message if user is on xcode 5.0.1 (address #1377)
This commit is contained in:
+19
-10
@@ -188,15 +188,19 @@ IOS.prototype.start = function(cb, onDie) {
|
||||
// createInstruments takes care of calling our launch callback,
|
||||
// so we don't do that in the series here
|
||||
async.series([
|
||||
function (cb) { this.cleanup(cb); }.bind(this),
|
||||
function (cb) { this.setXcodeVersion(cb); }.bind(this),
|
||||
function (cb) { this.detectTraceTemplate(cb); }.bind(this),
|
||||
function (cb) { this.detectUdid(cb); }.bind(this),
|
||||
function (cb) { this.parseLocalizableStrings(cb); }.bind(this),
|
||||
function (cb) { this.setDeviceType(cb); }.bind(this),
|
||||
function (cb) { this.installToRealDevice(cb); }.bind(this),
|
||||
function (cb) { createInstruments(); cb(); }.bind(this)
|
||||
], function() {});
|
||||
this.cleanup.bind(this),
|
||||
this.setXcodeVersion.bind(this),
|
||||
this.detectTraceTemplate.bind(this),
|
||||
this.detectUdid.bind(this),
|
||||
this.parseLocalizableStrings.bind(this),
|
||||
this.setDeviceType.bind(this),
|
||||
this.installToRealDevice.bind(this),
|
||||
function(cb) { createInstruments(); cb(); }.bind(this)
|
||||
], function(err) {
|
||||
if (err) {
|
||||
cb(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
IOS.prototype.onInstrumentsLaunch = function(launchCb) {
|
||||
@@ -303,7 +307,12 @@ IOS.prototype.setXcodeVersion = function(cb) {
|
||||
logger.error("Could not determine Xcode version");
|
||||
}
|
||||
this.xcodeVersion = versionNumber;
|
||||
cb();
|
||||
if (this.xcodeVersion === "5.0.1") {
|
||||
cb(new Error("Xcode 5.0.1 ships with a broken version of Instruments. " +
|
||||
"please downgrade to 5.0 or wait for a fix from Apple"));
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ var driverBlock = function(tests, host, port, caps, extraCaps) {
|
||||
beforeEach(function(done) {
|
||||
driverHolder.driver = wd.remote(host, port);
|
||||
var timeoutMs = caps.launchTimeout + 5000;
|
||||
var waitBetweenTries = 3000;
|
||||
var tries = 0;
|
||||
|
||||
var getSessionWithRetry = function() {
|
||||
@@ -47,7 +48,7 @@ var driverBlock = function(tests, host, port, caps, extraCaps) {
|
||||
if (err && tries < 3) {
|
||||
tries++;
|
||||
console.log("Could not get session, trying again");
|
||||
setTimeout(getSessionWithRetry, 1000);
|
||||
setTimeout(getSessionWithRetry, waitBetweenTries);
|
||||
} else {
|
||||
done(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user