fail with an error message if user is on xcode 5.0.1 (address #1377)

This commit is contained in:
Jonathan Lipps
2013-10-29 11:46:13 -07:00
parent 4f8c0594c6
commit fbf46618ba
2 changed files with 21 additions and 11 deletions
+19 -10
View File
@@ -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));
};
+2 -1
View File
@@ -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);
}