CB-11122 Look for Appium tests in the plugins folder

Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/1a137453
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/1a137453
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/1a137453

Branch: refs/heads/master
Commit: 1a137453c0ad7363ecc40396be021fdbceaf0c6c
Parents: cfe4e82
Author: Alexander Sorokin <alexander.soro...@akvelon.com>
Authored: Wed Apr 20 16:49:54 2016 +0300
Committer: Alexander Sorokin <alexander.soro...@akvelon.com>
Committed: Wed Apr 20 16:49:54 2016 +0300

----------------------------------------------------------------------
 medic/medic-appium.js | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/1a137453/medic/medic-appium.js
----------------------------------------------------------------------
diff --git a/medic/medic-appium.js b/medic/medic-appium.js
index 8810150..7c4098b 100644
--- a/medic/medic-appium.js
+++ b/medic/medic-appium.js
@@ -88,8 +88,8 @@ function getPackagePath(options) {
     }
 }
 
-function getLocalPluginDirs() {
-    return shell.ls("cordova-plugin-*");
+function getPluginDirs(appPath) {
+    return shell.ls(path.join(appPath, "/plugins/cordova-plugin-*"));
 }
 
 function parseArgs() {
@@ -143,12 +143,15 @@ function parseArgs() {
 
     // accepting both "plugins" or "plugin" arguments
     // if there is none, using default plugin list
+    if (argv.plugin) {
+        argv.plugins = argv.plugin;
+    }
     if (argv.plugins) {
-        options.pluginRepos = argv.plugins.split(" ");
-    } else if (argv.plugin) {
-        options.pluginRepos = argv.plugin.split(" ");
+        options.pluginRepos = argv.plugins.split(" ").map(function 
(pluginName) {
+            return path.join(options.appPath, "plugins", pluginName);
+        });
     } else {
-        options.pluginRepos = getLocalPluginDirs();
+        options.pluginRepos = getPluginDirs(options.appPath);
     }
 
     // looking for the tests


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to