mirror of
https://github.com/appium/appium.git
synced 2026-04-26 05:18:53 -05:00
+1
-1
@@ -36,7 +36,7 @@ for arg in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
appium_mocha="mocha --recursive -t 90000 -R spec $mocha_args"
|
||||
appium_mocha="./node_modules/.bin/mocha --recursive $mocha_args"
|
||||
|
||||
if $ios6_only || $ios_only || $all_tests; then
|
||||
echo "RUNNING IOS 6.1 TESTS"
|
||||
|
||||
@@ -131,13 +131,18 @@ ADB.prototype.checkAaptPresent = function (cb) {
|
||||
this.checkSdkBinaryPresent("aapt", cb);
|
||||
};
|
||||
|
||||
ADB.prototype.exec = function (cmd, cb) {
|
||||
ADB.prototype.exec = function (cmd, opts, cb) {
|
||||
if (!cb && typeof opts === 'function') {
|
||||
cb = opts;
|
||||
opts = {};
|
||||
}
|
||||
if (!cmd) {
|
||||
return cb(new Error("You need to pass in a command to exec()"));
|
||||
}
|
||||
cmd = this.adbCmd + ' ' + cmd;
|
||||
logger.debug("executing: " + cmd);
|
||||
exec(cmd, {maxBuffer: 524288}, function (err, stdout, stderr) {
|
||||
opts = _.defaults(opts, {maxBuffer: 524288});
|
||||
exec(cmd, opts, function (err, stdout, stderr) {
|
||||
if (err) logger.warn(err);
|
||||
cb(err, stdout, stderr);
|
||||
});
|
||||
@@ -1064,7 +1069,7 @@ ADB.prototype.waitForNotActivity = function (pkg, act, waitMs, cb) {
|
||||
|
||||
ADB.prototype.uninstallApk = function (pkg, cb) {
|
||||
logger.info("Uninstalling " + pkg);
|
||||
this.exec("uninstall " + pkg, function (err, stdout) {
|
||||
this.exec("uninstall " + pkg, {timeout: 20000}, function (err, stdout) {
|
||||
if (err) {
|
||||
logger.error(err);
|
||||
cb(err);
|
||||
|
||||
@@ -222,7 +222,7 @@ Android.prototype.onUiautomatorExit = function () {
|
||||
} else {
|
||||
uninstall();
|
||||
}
|
||||
}.bind(this.adb));
|
||||
}.bind(this));
|
||||
}
|
||||
}.bind(this));
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
"test": "grunt travis"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~1.14.0",
|
||||
"mocha": "~1.17.1",
|
||||
"underscore-cli": "~0.2.17",
|
||||
"wd": "~0.2.8",
|
||||
"yiewd": "~0.2.0",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
process.on('SIGINT', function () {
|
||||
process.exit();
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var Q = require('q'),
|
||||
var env = require('./env'),
|
||||
Q = require('q'),
|
||||
exec = Q.denodeify(require('child_process').exec);
|
||||
|
||||
exports.androidReset = function (appPackage, appActivity) {
|
||||
@@ -10,7 +11,7 @@ exports.androidReset = function (appPackage, appActivity) {
|
||||
|
||||
exports.androidUninstall = function (appPackage) {
|
||||
var cmd = 'adb uninstall ' + appPackage;
|
||||
return exec(cmd)
|
||||
return exec(cmd, {timeout: env.LAUNCH_TIMEOUT / 2})
|
||||
.catch(function () {})
|
||||
.then(function () { return Q.delay(500); });
|
||||
};
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
-t 90000
|
||||
-R spec
|
||||
-r ./test/helpers/quit-gracefully
|
||||
|
||||
Reference in New Issue
Block a user