diff --git a/lib/devices/ios/ios.js b/lib/devices/ios/ios.js index 1c65bea03..c65ad4d42 100644 --- a/lib/devices/ios/ios.js +++ b/lib/devices/ios/ios.js @@ -5,7 +5,6 @@ var path = require('path') , fs = require('fs') , _ = require('underscore') , logger = require('../../server/logger.js').get('appium') - , sock = '/tmp/instruments_sock' , glob = require('glob') , exec = require('child_process').exec , spawn = require('child_process').spawn @@ -131,6 +130,7 @@ IOS.prototype.setIOSArgs = function () { "http://" + this.args.robotAddress + ":" + this.args.robotPort + "" : null; this.curOrientation = this.args.initialOrientation; + this.sock = path.resolve(this.args.tmpDir || '/tmp', 'instruments_sock'); }; IOS.prototype.configureApp = function (cb) { @@ -237,11 +237,11 @@ IOS.prototype.preCleanup = function (cb) { var removeSocket = function (innerCb) { logger.debug("Removing any remaining instruments sockets"); - rimraf(sock, function (err) { + rimraf(this.sock, function (err) { if (err) return innerCb(err); - logger.debug("Cleaned up instruments socket " + sock); + logger.debug("Cleaned up instruments socket " + this.sock); innerCb(); - }); + }.bind(this)); }.bind(this); async.series([removeSocket, removeTracedirs], cb); @@ -289,7 +289,7 @@ IOS.prototype.start = function (cb, onDie) { IOS.prototype.createInstruments = function (cb) { logger.debug("Creating instruments"); - this.commandProxy = new CommandProxy({ sock: sock }); + this.commandProxy = new CommandProxy({ sock: this.sock }); this.makeInstruments(function (err, instruments) { if (err) return cb(err); this.instruments = instruments; @@ -338,7 +338,7 @@ IOS.prototype.startInstruments = function (cb) { IOS.prototype.makeInstruments = function (cb) { // at the moment all the logging in uiauto is at debug level // TODO: be able to use info in appium-uiauto - prepareBootstrap().then( + prepareBootstrap({sock: this.sock}).then( function (bootstrapPath) { var instruments = new Instruments({ app: this.args.app || this.args.bundleId @@ -353,6 +353,7 @@ IOS.prototype.makeInstruments = function (cb) { , launchTimeout: this.args.launchTimeout , flakeyRetries: this.args.backendRetries , simulatorSdkAndDevice: this.iOSSDKVersion >= 7.1 ? this.getDeviceString() : null + , tmpDir: path.resolve(this.args.tmpDir , 'appium-instruments') }); cb(null, instruments); }.bind(this), function (err) { cb(err); } diff --git a/package.json b/package.json index d07dbccf6..d34f1d954 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "adm-zip": "~0.4.4", "appium-adb": "~1.3.1", "appium-atoms": "~0.0.5", - "appium-instruments": "~1.2.0", - "appium-uiauto": "~1.5.0", + "appium-instruments": "~1.3.0", + "appium-uiauto": "~1.6.0", "argparse": "~0.1.15", "async": "~0.9.0", "binary-cookies": "~0.1.1", diff --git a/submodules/appium-instruments b/submodules/appium-instruments index b6742230e..dc09fa44b 160000 --- a/submodules/appium-instruments +++ b/submodules/appium-instruments @@ -1 +1 @@ -Subproject commit b6742230ea83672e8c4627b2ec5eec3b33861025 +Subproject commit dc09fa44bca22ec02ec0534f5eabe208884a51b6 diff --git a/submodules/appium-uiauto b/submodules/appium-uiauto index 437cc41ba..f01d6b992 160000 --- a/submodules/appium-uiauto +++ b/submodules/appium-uiauto @@ -1 +1 @@ -Subproject commit 437cc41bae4fbd2d52d0aa5161e7993512b47514 +Subproject commit f01d6b99281a6508d821dc6b71c2ded9b897dfce