You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2014/07/17 19:33:55 UTC

spec commit: CB-7086 Automatically install plugin tests

Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master 8a591f9bb -> 09b044043


CB-7086 Automatically install plugin tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/09b04404
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/09b04404
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/09b04404

Branch: refs/heads/master
Commit: 09b0440439a23561193fb74de55956d047b2bc58
Parents: 8a591f9
Author: Michal Mocny <mm...@gmail.com>
Authored: Thu Jul 17 13:33:39 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Thu Jul 17 13:33:39 2014 -0400

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/09b04404/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index 244c300..d44716b 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -240,6 +240,22 @@ if (argv.plugman) {
     shelljs.popd();
 }
 
+////////////////////// install new-style test plugins
+
+if (argv.plugman) {
+  // TODO
+} else {
+    shelljs.pushd(cli_project_dir);
+    console.log("Adding plugin tests using CLI...");
+    shelljs.ls('plugins').forEach(function(plugin) {
+      var potential_tests_plugin_xml = path.join('plugins', plugin, 'tests', 'plugin.xml')
+      if (fs.existsSync(potential_tests_plugin_xml)) {
+        shelljs.exec(cli + " plugin add " + path.dirname(potential_tests_plugin_xml));
+      }
+    });
+    shelljs.popd();
+}
+
 ////////////////////// update js files for each platform from cordova-js
 
 if (argv.skipjs) {