You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2014/10/06 21:45:37 UTC
spec commit: CB-7713 Add new-style tests when using --plugman option
Repository: cordova-mobile-spec
Updated Branches:
refs/heads/master 5ca8368cd -> ce1c1f043
CB-7713 Add new-style tests when using --plugman option
Also Fixed cordova.js when using --plugman option.
Fix tabs/lowercase.
Use www/plugins dir to fix on android.
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/ce1c1f04
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/ce1c1f04
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/ce1c1f04
Branch: refs/heads/master
Commit: ce1c1f04379270a43fdf2e5359fd909e8bf9e08d
Parents: 5ca8368
Author: Staci Cooper <sm...@us.ibm.com>
Authored: Thu Oct 2 15:53:06 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Mon Oct 6 15:44:27 2014 -0400
----------------------------------------------------------------------
createmobilespec/createmobilespec.js | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/ce1c1f04/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index 8ccf6b4..95788bd 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -413,6 +413,20 @@ function installPlugins() {
" install --platform " + platform +
" --project . --plugin " + path.join("..", "cordova-mobile-spec", "dependencies-plugin") +
" --searchpath " + top_dir);
+
+ // Install new-style test plugins
+ console.log("Adding plugin tests using plugman...");
+ var plugin_path = join_paths(platform_layout[platform].www.concat(["plugins"]));
+ shelljs.ls(plugin_path).forEach(function(plugin) {
+ var id_elts = plugin.split(".");
+ var plugin_name = "cordova-plugin-" + id_elts[id_elts.length - 1];
+ var potential_tests_plugin_xml = path.join(top_dir, plugin_name, 'tests', 'plugin.xml');
+ if (fs.existsSync(potential_tests_plugin_xml)) {
+ shelljs.exec(nodeCommand + path.join(top_dir, "cordova-plugman", "main.js") +
+ " install --platform " + platform +
+ " --project . --plugin " + path.dirname(potential_tests_plugin_xml));
+ }
+ });
popd();
});
} else {
@@ -434,14 +448,8 @@ function installPlugins() {
} else {
shelljs.exec(cli + " plugin add " + path.join(mobile_spec_git_dir, "dependencies-plugin") + searchpath);
}
- popd();
- }
-////////////////////// install new-style test plugins
- if (argv.plugman) {
- // TODO
- } else {
- pushd(cli_project_dir);
+ // Install new-style test plugins
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');
@@ -449,6 +457,7 @@ function installPlugins() {
shelljs.exec(cli + " plugin add " + path.dirname(potential_tests_plugin_xml));
}
});
+
popd();
}
}
@@ -479,7 +488,7 @@ function updateJS() {
platforms.forEach(function (platform) {
var src = path.join(cordova_js_git_dir, "pkg", "cordova." + (platform === "wp8" ? "windowsphone" : platform) + ".js");
- var dest = argv.plugman ? join_paths([top_dir, getProjName(platform)].concat(platform_layout[platform].www), "cordova.js") :
+ var dest = argv.plugman ? join_paths([top_dir, getProjName(platform)].concat(platform_layout[platform].www).concat(["cordova.js"])) :
path.join(cli_project_dir, "platforms", platform, "platform_www", "cordova.js");
shelljs.cp("-f", src, dest);
console.log("JavaScript file updated for " + platform);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org