You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2014/11/13 06:24:41 UTC
[01/14] cordova-medic git commit: Use ‘--link-to= ‘ param during ‘cordova create’ instead of manually linking mobilespec/www
Repository: cordova-medic
Updated Branches:
refs/heads/master 9c31ddbb3 -> f64c7dd84
Use ‘--link-to= ‘ param during ‘cordova create’ instead of manually linking mobilespec/www
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/cfb36162
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/cfb36162
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/cfb36162
Branch: refs/heads/master
Commit: cfb3616238b13674d3eaef73718149b0c8c14365
Parents: e1b6492
Author: maria.bukharina <ma...@akvelon.com>
Authored: Tue Oct 7 19:03:14 2014 +0400
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Tue Oct 7 19:03:14 2014 +0400
----------------------------------------------------------------------
master.cfg | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/cfb36162/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index df0830f..6177748 100644
--- a/master.cfg
+++ b/master.cfg
@@ -223,7 +223,7 @@ class PlatformTestBase(object):
def create_app_steps(self):
return [
- ShellCommand(command=["node", "cordova-cli/bin/cordova", "create", "mobilespec", "org.apache.mobilespec", "mobilespec"], workdir='build', haltOnFailure=True, description='CLI Create'),
+ ShellCommand(command=["node", "cordova-cli/bin/cordova", "create", "mobilespec", "org.apache.mobilespec", "mobilespec", "--link-to=./cordova-mobile-spec/www"], workdir='build', haltOnFailure=True, description='CLI Create'),
ShellCommand(command=["node", "medic/writejson.js", "--branch=master"], workdir='build', haltOnFailure=True, description='Write json')
]
@@ -240,8 +240,6 @@ class PlatformTestBase(object):
return [
ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../cordova-mobile-spec/dependencies-plugin", "--searchpath", ".."], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add'),
ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
- ShellCommand(command=["rm", "-rf", "mobilespec/www"], workdir='build', haltOnFailure=False, description='Remove www'),
- ShellCommand(command=["node", "-e", "require('fs').symlinkSync('../cordova-mobile-spec/www','www','dir')"], workdir='build/mobilespec', haltOnFailure=True, description='Link www'),
# added to handle the moved config.xml (up one directory)
ShellCommand(command=["cp", "cordova-mobile-spec/config.xml", "mobilespec/config.xml"], workdir='build', haltOnFailure=False, description='Copy config'),
ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config'),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[04/14] cordova-medic git commit: Fixed error with "COHO Clone
failed: Invalid repo value: wp8 Use the list-repos command to see value
values."
Posted by sg...@apache.org.
Fixed error with "COHO Clone failed: Invalid repo value: wp8
Use the list-repos command to see value values."
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/23d1cd59
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/23d1cd59
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/23d1cd59
Branch: refs/heads/master
Commit: 23d1cd592c2cb0c78b55c5b2ac1af6e7ce2ff6c6
Parents: f15c3da
Author: maria.bukharina <ma...@akvelon.com>
Authored: Wed Oct 8 15:20:06 2014 +0400
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Wed Oct 8 15:20:06 2014 +0400
----------------------------------------------------------------------
master.cfg | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/23d1cd59/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 352d977..7b72ece 100644
--- a/master.cfg
+++ b/master.cfg
@@ -213,6 +213,8 @@ class PlatformTestBase(object):
platform = "blackberry"
if platform == "windows8":
platform = "windows"
+ if platform == "wp8":
+ platform = "windowsphone"
return [
ShellCommand(command=["./cordova-coho/coho", "repo-clone", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Clone'),
ShellCommand(command=["./cordova-coho/coho", "repo-update", "-r", "plugins", "-r", "mobile-spec", "-r", platform, "-r", "js"], workdir='build', haltOnFailure=True, description='COHO Update'),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[12/14] cordova-medic git commit: Merge remote-tracking branch
'apache/master' into buildbot
Posted by sg...@apache.org.
Merge remote-tracking branch 'apache/master' into buildbot
Conflicts:
master.cfg
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/a23d3c9b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/a23d3c9b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/a23d3c9b
Branch: refs/heads/master
Commit: a23d3c9b96e48100c77156e98f98580640570642
Parents: 9783c6f 9c31ddb
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Tue Nov 11 02:48:54 2014 -0800
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Tue Nov 11 02:48:54 2014 -0800
----------------------------------------------------------------------
master.cfg | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/a23d3c9b/master.cfg
----------------------------------------------------------------------
diff --cc master.cfg
index cba5a82,92abfc7..53ff72c
--- a/master.cfg
+++ b/master.cfg
@@@ -363,14 -367,14 +363,14 @@@ if(build_android)
if(build_wp8):
factory_wp8 = BuildFactory()
factory_wp8.addSteps(PlatformTest_WP8().get_all_steps())
- c['builders'].append(BuilderConfig(name="WP8", slavenames=["windows-slave"], factory=factory_wp8))
- c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["win8-slave"], factory=factory_wp8))
+ c['builders'].append(BuilderConfig(name="WP8", slavenames=["cordova-windows-slave"], factory=factory_wp8))
+ c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_wp8))
-if(build_windows8):
- factory_windows8 = BuildFactory()
- factory_windows8.addSteps(PlatformTest_Windows8().get_all_steps())
- c['builders'].append(BuilderConfig(name="Windows8", slavenames=["cordova-windows-slave"], factory=factory_windows8))
- c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_windows8))
+if(build_windows):
+ factory_windows = BuildFactory()
+ factory_windows.addSteps(PlatformTest_Windows().get_all_steps())
- c['builders'].append(BuilderConfig(name="Windows", slavenames=["windows-slave"], factory=factory_windows))
- c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["win8-slave"], factory=factory_windows))
++ c['builders'].append(BuilderConfig(name="Windows", slavenames=["cordova-windows-slave"], factory=factory_windows))
++ c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["cordova-win8-slave"], factory=factory_windows))
if(build_blackberry):
factory_BlackBerry = BuildFactory()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[11/14] cordova-medic git commit: Fix step displaying results of
mobilespec tests
Posted by sg...@apache.org.
Fix step displaying results of mobilespec tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/9783c6f4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/9783c6f4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/9783c6f4
Branch: refs/heads/master
Commit: 9783c6f4cfe397bd97542d7415d6be4eafa86bd9
Parents: 98e3d2b
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Tue Nov 11 02:19:51 2014 -0800
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Tue Nov 11 02:19:51 2014 -0800
----------------------------------------------------------------------
build_android.js | 2 +-
build_blackberry10.js | 2 +-
build_ios.js | 2 +-
build_windows.js | 11 +++--
build_wp8.js | 15 ++++---
testchecker.js | 106 +++++++++++++++++++++++++--------------------
6 files changed, 80 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/build_android.js
----------------------------------------------------------------------
diff --git a/build_android.js b/build_android.js
index 5057ca0..038e95e 100644
--- a/build_android.js
+++ b/build_android.js
@@ -29,7 +29,7 @@ buildinfo('Android', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('Android tests complete');
- TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
+ TEST_OK = true;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/build_blackberry10.js
----------------------------------------------------------------------
diff --git a/build_blackberry10.js b/build_blackberry10.js
index 651ae32..8442adc 100644
--- a/build_blackberry10.js
+++ b/build_blackberry10.js
@@ -29,7 +29,7 @@ buildinfo('BlackBerry', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('BlackBerry tests complete');
- TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
+ TEST_OK = true;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/build_ios.js
----------------------------------------------------------------------
diff --git a/build_ios.js b/build_ios.js
index c6f5eb1..8eba73c 100644
--- a/build_ios.js
+++ b/build_ios.js
@@ -29,7 +29,7 @@ buildinfo('ios', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('iOS tests complete')
- TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
+ TEST_OK = true;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/build_windows.js
----------------------------------------------------------------------
diff --git a/build_windows.js b/build_windows.js
index 3425726..1ab94a9 100644
--- a/build_windows.js
+++ b/build_windows.js
@@ -57,9 +57,14 @@ buildinfo('Windows', BRANCH, function (error, sha ) {
}
windows(output_location, sha, config.app.entry, config.couchdb.host, test_timeout, build_target).then(function() {
- console.log('Windows test execution completed');
- TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
- }, function(err) {
+ return testcheck(sha, config.couchdb.host);
+ }).then(function (testCheckResult) {
+ TEST_OK = testCheckResult;
+
+ if (TEST_OK) {
+ console.log('Windows test execution completed');
+ }
+ }).catch(function (err) {
TEST_OK=false;
error_writer('windows', sha, 'Windows tests execution failed.', err);
});
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/build_wp8.js
----------------------------------------------------------------------
diff --git a/build_wp8.js b/build_wp8.js
index f700471..0b3c00c 100644
--- a/build_wp8.js
+++ b/build_wp8.js
@@ -28,12 +28,17 @@ buildinfo('WP8', BRANCH, function (error, sha ) {
var test_timeout = config.app.timeout ? config.app.timeout : 10 * 60;
wp8(output_location, sha, config.wp8.target, config.app.entry, config.couchdb.host, test_timeout).then(function() {
+ return testcheck(sha, config.couchdb.host);
+ }).then(function (testCheckResult) {
+ TEST_OK = testCheckResult;
+
+ if (TEST_OK) {
console.log('WP8 test execution completed');
- TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
- }, function(err) {
- TEST_OK=false;
- error_writer('wp8', sha, 'WP8 tests execution failed.', err);
- });
+ }
+ }).catch(function (err) {
+ TEST_OK=false;
+ error_writer('wp8', sha, 'WP8 tests execution failed.', err);
+ });
}
});
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9783c6f4/testchecker.js
----------------------------------------------------------------------
diff --git a/testchecker.js b/testchecker.js
index e9c8ccf..5e7d3ff 100644
--- a/testchecker.js
+++ b/testchecker.js
@@ -1,60 +1,72 @@
-var http = require('http');
-var url = require('url');
+var http = require('http'),
+ url = require('url');
+ q = require('q'),
-var checkTestResults = function(sha, dbHost) {
- console.log('Starting results verification for ' + sha);
+module.exports = function(sha, dbHost) {
- var options = {
- host: url.parse(dbHost).hostname,
- port: url.parse(dbHost).port,
- path: '/mobilespec_results/_all_docs?start_key="' + sha + '"&limit=1'
- };
+ function getDocumentIdBySha() {
+ var options = {
+ host: url.parse(dbHost).hostname,
+ port: url.parse(dbHost).port,
+ path: '/mobilespec_results/_all_docs?start_key="' + sha + '"&limit=1'
+ },
+ resultsDoc = '',
+ d = q.defer();
- var resultsDoc = "";
+ http.get(options, function(result) {
+ result.on("data", function(chunk) {
+ resultsDoc += chunk.toString();
+ });
- // get current document id by sha
- var req = http.get(options, function(result) {
- result.on("data", function(chunk) {
- resultsDoc += chunk.toString();
+ result.on('end', function () {
+ d.resolve(JSON.parse(resultsDoc).rows[0].id);
+ });
+ }).on('error', function(e) {
+ console.log("Got error: " + e.message);
+ d.reject(e);
});
+
+ return d.promise;
+ };
+
+ function getTestResult(resultId) {
- result.on('end', function () {
- var resultId = JSON.parse(resultsDoc).rows[0].id;
-
- var requestOptions = {
+ var options = {
host: url.parse(dbHost).hostname,
port: url.parse(dbHost).port,
path: '/mobilespec_results/' + resultId
- };
-
- var resultsJSON = "";
- var failure;
+ },
+ d = q.defer(),
+ resultsJSON = "",
+ failure;
- // get failures by document id
- var resultsRequest = http.get(requestOptions, function(res) {
- res.on("data", function(chunk) {
- resultsJSON += chunk;
- });
+ http.get(options, function(res) {
+ res.on("data", function(chunk) {
+ resultsJSON += chunk;
+ });
- res.on('end', function() {
- failure = JSON.parse(resultsJSON);
- if(typeof failure.mobilespec.failures == "undefined") {
- console.log("No failures were detected");
- return 0;
- } else {
- console.log('Test failures were detected. Open ' +
- dbHost + '/_utils/document.html?mobilespec_results/' +
- resultId + ' for details');
- return -1;
- }
- });
- }).on('error', function(e) {
- console.log("Got error: " + e.message);
+ res.on('end', function() {
+ d.resolve(JSON.parse(resultsJSON));
});
+ }).on('error', function(e) {
+ console.log("Got error: " + e.message);
+ d.reject(e)
});
- }).on('error', function(e) {
- console.log("Got error: " + e.message);
- });
-}
-
-module.exports.checkTestResults = checkTestResults;
\ No newline at end of file
+
+ return d.promise;
+ };
+
+ function checkFailure(testResult) {
+ if(typeof testResult.mobilespec.failures == "undefined") {
+ console.log("No failures were detected");
+ return true;
+ } else {
+ console.log('Test failures were detected. Open ' + dbHost + '/_utils/document.html?mobilespec_results/' + testResult._id + ' for details');
+ return false;
+ }
+ };
+
+ console.log('Starting results verification for ' + sha);
+
+ return getDocumentIdBySha().then(getTestResult).then(checkFailure);
+};
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[06/14] cordova-medic git commit: Create mobile-spec application via
createmobilespec script
Posted by sg...@apache.org.
Create mobile-spec application via createmobilespec script
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/81cf92db
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/81cf92db
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/81cf92db
Branch: refs/heads/master
Commit: 81cf92db7022f33cd10f36e8e165f014d87f1607
Parents: 2cde8c0
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Thu Oct 23 06:37:11 2014 -0700
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Thu Oct 23 06:37:11 2014 -0700
----------------------------------------------------------------------
master.cfg | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/81cf92db/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index daa6488..cba5a82 100644
--- a/master.cfg
+++ b/master.cfg
@@ -180,7 +180,6 @@ cli_steps = [
]
plugman_steps = [
- ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
ShellCommand(command=["git", "clone", repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
@@ -243,12 +242,11 @@ class PlatformTestBase(object):
def prepare_mobilespec_steps(self):
return [
- ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../cordova-mobile-spec/dependencies-plugin", "--searchpath", ".."], workdir='build/mobilespec', haltOnFailure=True, description='Plugin add'),
+ ShellCommand(command=["npm", "install"], workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
+ ShellCommand(command=["cordova-coho/coho", "npm-link"], workdir='build', haltOnFailure=True, description='COHO npm-link'),
+ ShellCommand(command=["cordova-mobile-spec/createmobilespec/createmobilespec", "--" + self.platform, "mobilespec"], workdir='build', haltOnFailure=True, description='Run createmobilespec'),
ShellCommand(command=["node", "../cordova-cli/bin/cordova", "plugin", "add", "../medic/cordova-plugin-medic"], workdir='build/mobilespec', haltOnFailure=True, description='Medic plugin add'),
- # added to handle the moved config.xml (up one directory)
- ShellCommand(command=["cp", "cordova-mobile-spec/config.xml", "mobilespec/config.xml"], workdir='build', haltOnFailure=False, description='Copy config'),
- ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config'),
- ShellCommand(command=["node", "../cordova-cli/bin/cordova", "prepare"], workdir='build/mobilespec', haltOnFailure=True, description='CLI Prepare')
+ ShellCommand(command=["node", "medic/updateconfig.js", "--" + self.platform], workdir='build', haltOnFailure=True, description='Update config')
]
def copy_cordovajs_steps(self):
@@ -265,6 +263,7 @@ class PlatformTestBase(object):
steps.extend(self.init_workspace_steps())
steps.extend(self.repos_clone_steps())
steps.extend(cli_steps)
+ steps.extend(plugman_steps)
steps.extend(self.create_app_steps())
steps.extend(self.platform_add_steps())
steps.extend(self.build_cordovajs_steps())
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[05/14] cordova-medic git commit: replacing 'windows8' platform with
'windows'
Posted by sg...@apache.org.
replacing 'windows8' platform with 'windows'
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/2cde8c0a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/2cde8c0a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/2cde8c0a
Branch: refs/heads/master
Commit: 2cde8c0ab47fe3e99d0f8115598ecf31ad64470a
Parents: 23d1cd5
Author: MariaBukharina <ma...@akvelon.com>
Authored: Wed Oct 8 16:18:12 2014 +0400
Committer: MariaBukharina <ma...@akvelon.com>
Committed: Wed Oct 8 16:18:12 2014 +0400
----------------------------------------------------------------------
build_windows.js | 70 ++++++++++++++++++++++++
build_windows8.js | 74 --------------------------
master.cfg | 28 ++++------
repos.json | 8 +--
src/build/makers/windows.js | 109 ++++++++++++++++++++++++++++++++++++++
src/build/makers/windows8.js | 109 --------------------------------------
6 files changed, 192 insertions(+), 206 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/build_windows.js
----------------------------------------------------------------------
diff --git a/build_windows.js b/build_windows.js
new file mode 100644
index 0000000..6f3cb55
--- /dev/null
+++ b/build_windows.js
@@ -0,0 +1,70 @@
+var fs = require('fs');
+var path = require ('path');
+var shell = require('shelljs');
+var buildinfo = require('./buildinfo');
+var config = require('./config');
+var windows = require('./src/build/makers/windows');
+var argv = require('optimist').argv;
+var error_writer = require('./src/build/makers/error_writer');
+
+// this assumes that you start it in the sandbox
+
+var TEST_DIR=process.cwd().replace(/\\/g, '\\\\');
+var BRANCH='master';
+var TOOL_DIR=path.join(TEST_DIR,'medic');
+var MSPEC_DIR=path.join(TEST_DIR,'mobilespec');
+
+var TEST_OK=true;
+
+if(argv.branch) BRANCH=argv.branch;
+
+var output_location = path.join(MSPEC_DIR,'platforms','windows');
+
+buildinfo('Windows', BRANCH, function (error, sha ) {
+
+ function log(msg) {
+ console.log('[WINDOWS] ' + msg + ' (sha: ' + sha + ')');
+ }
+
+ function setTargetStoreVersion(version) {
+ log('setting target store version to ' + version);
+
+ var configPath = 'mobilespec/config.xml';
+ configContent = fs.readFileSync(configPath, "utf8");
+
+ var versionPreference = '<preference name="windows-target-version" value="' + version + '" />';
+ configContent = configContent.replace ('</widget>', versionPreference + '\r\n</widget>')
+
+ fs.writeFileSync(configPath, configContent, "utf8");
+ }
+
+ if(error) {
+ TEST_OK=false;
+ } else {
+ // timeout to execute tests, 10 min by default
+ var test_timeout = config.app.timeout ? config.app.timeout : 10 * 60;
+ log(argv);
+ var build_target = argv.phone ? "phone" : argv.store80 ? "store80" : "store";
+ log(build_target);
+
+ if (build_target == "store80") {
+ build_target == "store";
+ //setTargetStoreVersion('8.0'); // this value is used by default
+ } else if (build_target == "store") {
+ // store target configuration is specified via config.xml
+ setTargetStoreVersion('8.1');
+ }
+
+ windows(output_location, sha, config.app.entry, config.couchdb.host, test_timeout, build_target).then(function() {
+ console.log('Windows test execution completed');
+ }, function(err) {
+ TEST_OK=false;
+ error_writer('windows', sha, 'Windows tests execution failed.', err);
+ });
+ }
+});
+
+process.once('exit', function () {
+ if(!TEST_OK) process.exit(1);
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/build_windows8.js
----------------------------------------------------------------------
diff --git a/build_windows8.js b/build_windows8.js
deleted file mode 100644
index b7bb821..0000000
--- a/build_windows8.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var fs = require('fs');
-var path = require ('path');
-var shell = require('shelljs');
-var buildinfo = require('./buildinfo');
-var config = require('./config');
-var windows8 = require('./src/build/makers/windows8');
-var argv = require('optimist').argv;
-var error_writer = require('./src/build/makers/error_writer');
-
-// this assumes that you start it in the sandbox
-
-var TEST_DIR=process.cwd().replace(/\\/g, '\\\\');
-var BRANCH='master';
-var TOOL_DIR=path.join(TEST_DIR,'medic');
-var MSPEC_DIR=path.join(TEST_DIR,'mobilespec');
-
-var TEST_OK=true;
-
-if(argv.branch) BRANCH=argv.branch;
-
-var output_location = path.join(MSPEC_DIR,'platforms','windows8');
-// fixes tests crash when windows universal apps used to test
-if (!fs.existsSync(output_location)){
- output_location = path.join(MSPEC_DIR,'platforms','windows');
-}
-
-buildinfo('Windows8', BRANCH, function (error, sha ) {
-
- function log(msg) {
- console.log('[WINDOWS8] ' + msg + ' (sha: ' + sha + ')');
- }
-
- function setTargetStoreVersion(version) {
- log('setting target store version to ' + version);
-
- var configPath = 'mobilespec/config.xml';
- configContent = fs.readFileSync(configPath, "utf8");
-
- var versionPreference = '<preference name="windows-target-version" value="' + version + '" />';
- configContent = configContent.replace ('</widget>', versionPreference + '\r\n</widget>')
-
- fs.writeFileSync(configPath, configContent, "utf8");
- }
-
- if(error) {
- TEST_OK=false;
- } else {
- // timeout to execute tests, 10 min by default
- var test_timeout = config.app.timeout ? config.app.timeout : 10 * 60;
- log(argv);
- var build_target = argv.phone ? "phone" : argv.store80 ? "store80" : "store";
- log(build_target);
-
- if (build_target == "store80") {
- build_target == "store";
- //setTargetStoreVersion('8.0'); // this value is used by default
- } else if (build_target == "store") {
- // store target configuration is specified via config.xml
- setTargetStoreVersion('8.1');
- }
-
- windows8(output_location, sha, config.app.entry, config.couchdb.host, test_timeout, build_target).then(function() {
- console.log('Windows8 test execution completed');
- }, function(err) {
- TEST_OK=false;
- error_writer('windows8', sha, 'Windows8 tests execution failed.', err);
- });
- }
-});
-
-process.once('exit', function () {
- if(!TEST_OK) process.exit(1);
-});
-
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 7b72ece..daa6488 100644
--- a/master.cfg
+++ b/master.cfg
@@ -40,7 +40,7 @@ build_android = ('android' in platform_list)
build_chrome = ('chrome' in platform_list)
build_ios = ('ios' in platform_list)
build_wp8 = ('wp8' in platform_list)
-build_windows8 = ('windows8' in platform_list)
+build_windows = ('windows' in platform_list)
build_blackberry = ('blackberry' in platform_list)
projectbranches = ['master', branch_release]
polltime = 300
@@ -119,7 +119,7 @@ for jrepo in json_repos['repos']:
if (build_android and title == "ANDROID"
or build_ios and title == "IOS"
or build_wp8 and title == "WP8"
- or build_windows8 and title == "WINDOWS8"
+ or build_windows and title == "WINDOWS"
or build_blackberry and title == "BLACKBERRY"):
listen_for_source_change(repo_url, title, 'PLATFORM', getBranches([jrepo['release'], jrepo['current']]))
@@ -211,8 +211,6 @@ class PlatformTestBase(object):
# required by coho tools to correctly resolve repo location
if platform == "blackberry10":
platform = "blackberry"
- if platform == "windows8":
- platform = "windows"
if platform == "wp8":
platform = "windowsphone"
return [
@@ -234,8 +232,6 @@ class PlatformTestBase(object):
# required by coho tools to correctly resolve repo location
if platform == "blackberry10":
platform = "blackberry"
- if platform == "windows8":
- platform = "windows"
platformPath = "../cordova-" + platform
return [ShellCommand(command=["../cordova-cli/bin/cordova", "platform", "add", platformPath], workdir='build/mobilespec', haltOnFailure=True, description='Platform Add')]
@@ -314,16 +310,10 @@ class PlatformTest_WP8(PlatformTestBase):
return steps
-class PlatformTest_Windows8(PlatformTestBase):
+class PlatformTest_Windows(PlatformTestBase):
def __init__(self):
- super(PlatformTest_Windows8, self).__init__('windows8')
-
- def copy_cordovajs_steps(self):
- copy_cmd = "var fs=require('fs');"
- copy_cmd += "var platform=fs.existsSync('mobilespec/platforms/windows8')?'windows8':'windows';"
- copy_cmd += "fs.createReadStream('cordova-js/pkg/cordova.'+platform+'.js').pipe(fs.createWriteStream('mobilespec/platforms/'+platform+'/platform_www/cordova.js'));"
- return [ShellCommand(command=["node", "-e", copy_cmd], workdir='build', haltOnFailure=False, description='Copy JS to Windows platform')]
+ super(PlatformTest_Windows, self).__init__('windows')
def deploy_steps(self):
return [
@@ -377,11 +367,11 @@ if(build_wp8):
c['builders'].append(BuilderConfig(name="WP8", slavenames=["windows-slave"], factory=factory_wp8))
c['builders'].append(BuilderConfig(name="WP8_vs2012_win8", slavenames=["win8-slave"], factory=factory_wp8))
-if(build_windows8):
- factory_windows8 = BuildFactory()
- factory_windows8.addSteps(PlatformTest_Windows8().get_all_steps())
- c['builders'].append(BuilderConfig(name="Windows8", slavenames=["windows-slave"], factory=factory_windows8))
- c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["win8-slave"], factory=factory_windows8))
+if(build_windows):
+ factory_windows = BuildFactory()
+ factory_windows.addSteps(PlatformTest_Windows().get_all_steps())
+ c['builders'].append(BuilderConfig(name="Windows", slavenames=["windows-slave"], factory=factory_windows))
+ c['builders'].append(BuilderConfig(name="Windows8_vs2012_win8", slavenames=["win8-slave"], factory=factory_windows))
if(build_blackberry):
factory_BlackBerry = BuildFactory()
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/repos.json
----------------------------------------------------------------------
diff --git a/repos.json b/repos.json
index 6df6f94..ca7cf0e 100644
--- a/repos.json
+++ b/repos.json
@@ -45,10 +45,10 @@
},
{
"title" : "Windows 8 master",
- "categories" : ["WINDOWS8"],
+ "categories" : ["WINDOWS"],
"branch" : "master",
- "builder": ["Windows8", "Windows8_vs2012_win8"],
- "platform": "windows8"
+ "builder": ["Windows", "Windows8_vs2012_win8"],
+ "platform": "windows"
}
,
{
@@ -153,7 +153,7 @@
"release" : "master",
"current" :"master"
},{
- "title" : "WINDOWS8",
+ "title" : "WINDOWS",
"repo" : "https://git-wip-us.apache.org/repos/asf/cordova-windows.git",
"category" : "PLATFORM",
"release" : "master",
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/src/build/makers/windows.js
----------------------------------------------------------------------
diff --git a/src/build/makers/windows.js b/src/build/makers/windows.js
new file mode 100644
index 0000000..ddedd93
--- /dev/null
+++ b/src/build/makers/windows.js
@@ -0,0 +1,109 @@
+var shell = require('shelljs'),
+ path = require('path'),
+ n = require('ncallbacks'),
+ fs = require('fs'),
+ mspec = require('./mobile_spec'),
+ couch = require('../../couchdb/interface'),
+ q = require('q'),
+ testRunner = require('./testRunner'),
+ util = require('util');
+
+module.exports = function(output, sha, entry_point, couchdb_host, test_timeout, build_target) {
+
+ function run() {
+ var d = q.defer();
+ log('Running app...');
+ var cmd = (build_target == "store80" || build_target == "phone") ?
+ '..\\cordova-cli\\bin\\cordova.cmd run -- --' + build_target :
+ '..\\cordova-cli\\bin\\cordova.cmd run',
+ logFile = sha + '.log',
+ errFile = sha + '.err',
+ endFile = sha + '.end',
+ runner = 'run.bat';
+
+ // create commands that should be started from bat file:
+ // 1. cd to project folder
+ // 2. start 'cmd' defined earlier and redirect its stdout and stderr to files
+ // 3. print exit code of 'cmd' to 'endfile'
+ var runnerContent = util.format('cd /d "%s"\n%s 1>%s 2>%s & echo "%ERRORLEVEL%" >%s',
+ shell.pwd(), cmd, logFile, errFile, endFile);
+
+ fs.writeFileSync(runner, runnerContent, 'utf-8');
+
+ // the following hack with explorer.exe usage is required to start the tool w/o Admin privileges;
+ // in other case there will be the 'app can't open while File Explorer is running with administrator privileges ...' error
+ shell.exec('explorer ' + runner, {async: false});
+
+ // Due to explorer, that don't redirects output of child cmd process
+ // and exits immediately after starting bat file we are waiting for
+ // special marker - 'endfile' - to be created when cordova run exits.
+ var waitForRunner = setInterval(function () {
+ if (fs.existsSync(endFile)){
+ clearInterval(waitForRunner);
+ log(fs.readFileSync(logFile));
+ // read 'cordova run' exit code from endfile, that was written by run.bat
+ var exitCode = parseInt(fs.readFileSync(endFile, 'utf-8'), 10);
+ if (exitCode > 0){
+ log(fs.readFileSync(errFile));
+ d.reject('Unable to run application. Exit code: ' + exitCode);
+ }
+ d.resolve();
+ }
+ }, 1000);
+ return d.promise;
+ }
+
+ function log(msg) {
+ console.log('[WINDOWS] ' + msg + ' (sha: ' + sha + ')');
+ }
+
+ function prepareMobileSpec() {
+ // make sure windows app got created first.
+ var defer = q.defer();
+ try {
+ if (!fs.existsSync(output)) {
+ throw new Error('create must have failed as output path does not exist.');
+ }
+ var mspec_out = path.join(output, 'www');
+
+ log('Modifying Cordova Mobilespec application at:'+mspec_out);
+
+ mspec(mspec_out,sha,'',entry_point, function(err){
+ if(err) {
+ throw new Error('Error while modifying Windows mobile spec application.');
+ }
+
+ // specify couchdb server and sha for cordova medic plugin via medic.json
+ log('Write medic.json to autotest folder');
+ var medic_config='{"sha":"'+sha+'","couchdb":"'+couchdb_host+'"}';
+ fs.writeFileSync(path.join(output, '..', '..', 'www','autotest','pages', 'medic.json'),medic_config,'utf-8');
+
+ // patch WindowsStoreAppUtils script to allow app run w/out active desktop/remote session
+ if (build_target == "store80" || build_target == "store") {
+ log('Patching WindowsStoreAppUtils to allow app to be run in automated mode');
+ shell.cp('-f', path.join(output, '..', '..', '..','medic','src', 'utils', 'EnableDebuggingForPackage.ps1'),
+ path.join(output, 'cordova', 'lib'));
+ shell.sed('-i', /^\s*\$appActivator .*$/gim,
+ '$&\n' +
+ ' powershell ' + path.join(output, 'cordova', 'lib', 'EnableDebuggingForPackage.ps1') + ' $$ID\n' +
+ ' $Ole32 = Add-Type -MemberDefinition \'[DllImport("Ole32.dll")]public static extern int CoAllowSetForegroundWindow(IntPtr pUnk, IntPtr lpvReserved);\' -Name \'Ole32\' -Namespace \'Win32\' -PassThru\n' +
+ ' $Ole32::CoAllowSetForegroundWindow([System.Runtime.InteropServices.Marshal]::GetIUnknownForObject($appActivator), [System.IntPtr]::Zero)',
+ path.join(output, 'cordova', 'lib', 'WindowsStoreAppUtils.ps1'));
+ }
+
+ defer.resolve();
+ });
+ }
+ catch (e) {
+ defer.reject(e);
+ }
+ return defer.promise;
+ }
+
+ return prepareMobileSpec().then(function() {
+ shell.cd(path.join(output, '..', '..'));
+ return run();
+ }).then(function() {
+ return testRunner.waitTestsCompleted(sha, 1000 * test_timeout);
+ });
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/2cde8c0a/src/build/makers/windows8.js
----------------------------------------------------------------------
diff --git a/src/build/makers/windows8.js b/src/build/makers/windows8.js
deleted file mode 100644
index 0fe2553..0000000
--- a/src/build/makers/windows8.js
+++ /dev/null
@@ -1,109 +0,0 @@
-var shell = require('shelljs'),
- path = require('path'),
- n = require('ncallbacks'),
- fs = require('fs'),
- mspec = require('./mobile_spec'),
- couch = require('../../couchdb/interface'),
- q = require('q'),
- testRunner = require('./testRunner'),
- util = require('util');
-
-module.exports = function(output, sha, entry_point, couchdb_host, test_timeout, build_target) {
-
- function run() {
- var d = q.defer();
- log('Running app...');
- var cmd = (build_target == "store80" || build_target == "phone") ?
- '..\\cordova-cli\\bin\\cordova.cmd run -- --' + build_target :
- '..\\cordova-cli\\bin\\cordova.cmd run',
- logFile = sha + '.log',
- errFile = sha + '.err',
- endFile = sha + '.end',
- runner = 'run.bat';
-
- // create commands that should be started from bat file:
- // 1. cd to project folder
- // 2. start 'cmd' defined earlier and redirect its stdout and stderr to files
- // 3. print exit code of 'cmd' to 'endfile'
- var runnerContent = util.format('cd /d "%s"\n%s 1>%s 2>%s & echo "%ERRORLEVEL%" >%s',
- shell.pwd(), cmd, logFile, errFile, endFile);
-
- fs.writeFileSync(runner, runnerContent, 'utf-8');
-
- // the following hack with explorer.exe usage is required to start the tool w/o Admin privileges;
- // in other case there will be the 'app can't open while File Explorer is running with administrator privileges ...' error
- shell.exec('explorer ' + runner, {async: false});
-
- // Due to explorer, that don't redirects output of child cmd process
- // and exits immediately after starting bat file we are waiting for
- // special marker - 'endfile' - to be created when cordova run exits.
- var waitForRunner = setInterval(function () {
- if (fs.existsSync(endFile)){
- clearInterval(waitForRunner);
- log(fs.readFileSync(logFile));
- // read 'cordova run' exit code from endfile, that was written by run.bat
- var exitCode = parseInt(fs.readFileSync(endFile, 'utf-8'), 10);
- if (exitCode > 0){
- log(fs.readFileSync(errFile));
- d.reject('Unable to run application. Exit code: ' + exitCode);
- }
- d.resolve();
- }
- }, 1000);
- return d.promise;
- }
-
- function log(msg) {
- console.log('[WINDOWS8] ' + msg + ' (sha: ' + sha + ')');
- }
-
- function prepareMobileSpec() {
- // make sure windows8 app got created first.
- var defer = q.defer();
- try {
- if (!fs.existsSync(output)) {
- throw new Error('create must have failed as output path does not exist.');
- }
- var mspec_out = path.join(output, 'www');
-
- log('Modifying Cordova Mobilespec application at:'+mspec_out);
-
- mspec(mspec_out,sha,'',entry_point, function(err){
- if(err) {
- throw new Error('Error while modifying Windows8 mobile spec application.');
- }
-
- // specify couchdb server and sha for cordova medic plugin via medic.json
- log('Write medic.json to autotest folder');
- var medic_config='{"sha":"'+sha+'","couchdb":"'+couchdb_host+'"}';
- fs.writeFileSync(path.join(output, '..', '..', 'www','autotest','pages', 'medic.json'),medic_config,'utf-8');
-
- // patch WindowsStoreAppUtils script to allow app run w/out active desktop/remote session
- if (build_target == "store80" || build_target == "store") {
- log('Patching WindowsStoreAppUtils to allow app to be run in automated mode');
- shell.cp('-f', path.join(output, '..', '..', '..','medic','src', 'utils', 'EnableDebuggingForPackage.ps1'),
- path.join(output, 'cordova', 'lib'));
- shell.sed('-i', /^\s*\$appActivator .*$/gim,
- '$&\n' +
- ' powershell ' + path.join(output, 'cordova', 'lib', 'EnableDebuggingForPackage.ps1') + ' $$ID\n' +
- ' $Ole32 = Add-Type -MemberDefinition \'[DllImport("Ole32.dll")]public static extern int CoAllowSetForegroundWindow(IntPtr pUnk, IntPtr lpvReserved);\' -Name \'Ole32\' -Namespace \'Win32\' -PassThru\n' +
- ' $Ole32::CoAllowSetForegroundWindow([System.Runtime.InteropServices.Marshal]::GetIUnknownForObject($appActivator), [System.IntPtr]::Zero)',
- path.join(output, 'cordova', 'lib', 'WindowsStoreAppUtils.ps1'));
- }
-
- defer.resolve();
- });
- }
- catch (e) {
- defer.reject(e);
- }
- return defer.promise;
- }
-
- return prepareMobileSpec().then(function() {
- shell.cd(path.join(output, '..', '..'));
- return run();
- }).then(function() {
- return testRunner.waitTestsCompleted(sha, 1000 * test_timeout);
- });
-};
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[14/14] cordova-medic git commit: Add Android full build under Windows
Posted by sg...@apache.org.
Add Android full build under Windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/f64c7dd8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/f64c7dd8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/f64c7dd8
Branch: refs/heads/master
Commit: f64c7dd84765fdde33476b37389f936788ef5704
Parents: 9625b32
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Tue Nov 11 06:37:05 2014 -0800
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Tue Nov 11 06:37:05 2014 -0800
----------------------------------------------------------------------
master.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/f64c7dd8/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 53ff72c..47f6cc8 100644
--- a/master.cfg
+++ b/master.cfg
@@ -357,7 +357,7 @@ if(build_android):
c['builders'].append(BuilderConfig(name="Android", slavenames=["cordova-android-slave"], factory=factory_Android_master))
factory_Android_build_only = BuildFactory()
- factory_Android_build_only.addSteps(PlatformTest_Android().get_build_steps())
+ factory_Android_build_only.addSteps(PlatformTest_Android().get_all_steps())
c['builders'].append(BuilderConfig(name="AndroidWin", slavenames=["cordova-windows-slave"], factory=factory_Android_build_only))
if(build_wp8):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[08/14] cordova-medic git commit: Merged config.json.sample-windows
and config.json.sample files
Posted by sg...@apache.org.
Merged config.json.sample-windows and config.json.sample files
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/17ddd9b8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/17ddd9b8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/17ddd9b8
Branch: refs/heads/master
Commit: 17ddd9b89a5e1c20b5ec132af96c7afc4135ea5f
Parents: 2cde8c0
Author: maria.bukharina <ma...@akvelon.com>
Authored: Wed Oct 29 13:54:51 2014 +0300
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Wed Oct 29 13:54:51 2014 +0300
----------------------------------------------------------------------
config.json.sample | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/17ddd9b8/config.json.sample
----------------------------------------------------------------------
diff --git a/config.json.sample b/config.json.sample
index c563627..6048d55 100644
--- a/config.json.sample
+++ b/config.json.sample
@@ -15,8 +15,9 @@
"git":"https://git-wip-us.apache.org/repos/asf/cordova-mobile-spec.git"
},
"entry":"autotest/pages/all.html",
- "platforms":"android ios",
- "release":"3.0.0"
+ "platforms":"android ios windows8 wp8",
+ "release":"master",
+ "timeout": 600
},
"blackberry":{
"devices":{
@@ -36,6 +37,13 @@
"keychainPassword":"",
"keychainLocation":""
},
+ "wp8":{
+ "target": "device",
+ "TODO" : "add several targets support: emulators: WVGA, WXGA, 720p, 1080p or devices: default or specified by id 7988B8C3-3ADE-488d-BA3E-D052AC9DC710"
+ },
+ "windows8": {
+ "target": "local|emulator|device"
+ },
"mail":{
"to":["someone@someplace.com"],
"from":"yourbuildbot@yourEmailService.com",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[07/14] cordova-medic git commit: Add step displaying results of
mobilespec tests
Posted by sg...@apache.org.
Add step displaying results of mobilespec tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/8ace6367
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/8ace6367
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/8ace6367
Branch: refs/heads/master
Commit: 8ace6367747e1ff7a8b070283e308d82cc5a1334
Parents: 81cf92d
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Thu Oct 23 10:22:04 2014 -0700
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Thu Oct 23 10:22:04 2014 -0700
----------------------------------------------------------------------
build_android.js | 2 ++
build_blackberry10.js | 2 ++
build_ios.js | 2 ++
build_windows.js | 2 ++
build_wp8.js | 2 ++
testchecker.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 70 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/build_android.js
----------------------------------------------------------------------
diff --git a/build_android.js b/build_android.js
index 436c446..5057ca0 100644
--- a/build_android.js
+++ b/build_android.js
@@ -4,6 +4,7 @@ var buildinfo = require('./buildinfo');
var config = require('./config');
var android = require('./src/build/makers/android');
var argv = require('optimist').argv;
+var testcheck = require('./testchecker');
// this assumes that you start it in the sandbox
@@ -28,6 +29,7 @@ buildinfo('Android', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('Android tests complete');
+ TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/build_blackberry10.js
----------------------------------------------------------------------
diff --git a/build_blackberry10.js b/build_blackberry10.js
index 9556f34..651ae32 100644
--- a/build_blackberry10.js
+++ b/build_blackberry10.js
@@ -4,6 +4,7 @@ var path = require ('path'),
config = require('./config'),
blackberry10 = require('./src/build/makers/blackberry10'),
argv = require('optimist').argv;
+var testcheck = require('./testchecker');
// this assumes that you start it in the sandbox
@@ -28,6 +29,7 @@ buildinfo('BlackBerry', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('BlackBerry tests complete');
+ TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/build_ios.js
----------------------------------------------------------------------
diff --git a/build_ios.js b/build_ios.js
index ecf0a90..c6f5eb1 100644
--- a/build_ios.js
+++ b/build_ios.js
@@ -4,6 +4,7 @@ var buildinfo = require('./buildinfo');
var config = require('./config');
var ios = require('./src/build/makers/ios');
var argv = require('optimist').argv;
+var testcheck = require('./testchecker');
// this assumes that you start it in the sandbox
@@ -28,6 +29,7 @@ buildinfo('ios', BRANCH, function (error, sha ) {
TEST_OK=false;
} else {
console.log('iOS tests complete')
+ TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
}
});
}
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/build_windows.js
----------------------------------------------------------------------
diff --git a/build_windows.js b/build_windows.js
index 6f3cb55..3425726 100644
--- a/build_windows.js
+++ b/build_windows.js
@@ -6,6 +6,7 @@ var config = require('./config');
var windows = require('./src/build/makers/windows');
var argv = require('optimist').argv;
var error_writer = require('./src/build/makers/error_writer');
+var testcheck = require('./testchecker');
// this assumes that you start it in the sandbox
@@ -57,6 +58,7 @@ buildinfo('Windows', BRANCH, function (error, sha ) {
windows(output_location, sha, config.app.entry, config.couchdb.host, test_timeout, build_target).then(function() {
console.log('Windows test execution completed');
+ TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
}, function(err) {
TEST_OK=false;
error_writer('windows', sha, 'Windows tests execution failed.', err);
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/build_wp8.js
----------------------------------------------------------------------
diff --git a/build_wp8.js b/build_wp8.js
index 92793c4..f700471 100644
--- a/build_wp8.js
+++ b/build_wp8.js
@@ -5,6 +5,7 @@ var config = require('./config');
var wp8 = require('./src/build/makers/wp8');
var argv = require('optimist').argv;
var error_writer = require('./src/build/makers/error_writer');
+var testcheck = require('./testchecker');
// this assumes that you start it in the sandbox
@@ -28,6 +29,7 @@ buildinfo('WP8', BRANCH, function (error, sha ) {
wp8(output_location, sha, config.wp8.target, config.app.entry, config.couchdb.host, test_timeout).then(function() {
console.log('WP8 test execution completed');
+ TEST_OK = testcheck.checkTestResults(sha, config.couchdb.host) == 0 ? true : false;
}, function(err) {
TEST_OK=false;
error_writer('wp8', sha, 'WP8 tests execution failed.', err);
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8ace6367/testchecker.js
----------------------------------------------------------------------
diff --git a/testchecker.js b/testchecker.js
new file mode 100644
index 0000000..e9c8ccf
--- /dev/null
+++ b/testchecker.js
@@ -0,0 +1,60 @@
+var http = require('http');
+var url = require('url');
+
+var checkTestResults = function(sha, dbHost) {
+ console.log('Starting results verification for ' + sha);
+
+ var options = {
+ host: url.parse(dbHost).hostname,
+ port: url.parse(dbHost).port,
+ path: '/mobilespec_results/_all_docs?start_key="' + sha + '"&limit=1'
+ };
+
+ var resultsDoc = "";
+
+ // get current document id by sha
+ var req = http.get(options, function(result) {
+ result.on("data", function(chunk) {
+ resultsDoc += chunk.toString();
+ });
+
+ result.on('end', function () {
+ var resultId = JSON.parse(resultsDoc).rows[0].id;
+
+ var requestOptions = {
+ host: url.parse(dbHost).hostname,
+ port: url.parse(dbHost).port,
+ path: '/mobilespec_results/' + resultId
+ };
+
+ var resultsJSON = "";
+ var failure;
+
+ // get failures by document id
+ var resultsRequest = http.get(requestOptions, function(res) {
+ res.on("data", function(chunk) {
+ resultsJSON += chunk;
+ });
+
+ res.on('end', function() {
+ failure = JSON.parse(resultsJSON);
+ if(typeof failure.mobilespec.failures == "undefined") {
+ console.log("No failures were detected");
+ return 0;
+ } else {
+ console.log('Test failures were detected. Open ' +
+ dbHost + '/_utils/document.html?mobilespec_results/' +
+ resultId + ' for details');
+ return -1;
+ }
+ });
+ }).on('error', function(e) {
+ console.log("Got error: " + e.message);
+ });
+ });
+ }).on('error', function(e) {
+ console.log("Got error: " + e.message);
+ });
+}
+
+module.exports.checkTestResults = checkTestResults;
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[03/14] cordova-medic git commit: Adding platform from downloaded
folder instead of npm package
Posted by sg...@apache.org.
Adding platform from downloaded folder instead of npm package
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/f15c3daa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/f15c3daa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/f15c3daa
Branch: refs/heads/master
Commit: f15c3daa3d54bb666ae5d7430da017f3cbbd209f
Parents: 8e6e2b6
Author: maria.bukharina <ma...@akvelon.com>
Authored: Wed Oct 8 11:38:26 2014 +0400
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Wed Oct 8 11:38:26 2014 +0400
----------------------------------------------------------------------
master.cfg | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/f15c3daa/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 82cde0d..352d977 100644
--- a/master.cfg
+++ b/master.cfg
@@ -228,7 +228,14 @@ class PlatformTestBase(object):
]
def platform_add_steps(self):
- return [ShellCommand(command=["../cordova-cli/bin/cordova", "platform", "add", self.platform], workdir='build/mobilespec', haltOnFailure=True, description='Platform Add')]
+ platform = self.platform
+ # required by coho tools to correctly resolve repo location
+ if platform == "blackberry10":
+ platform = "blackberry"
+ if platform == "windows8":
+ platform = "windows"
+ platformPath = "../cordova-" + platform
+ return [ShellCommand(command=["../cordova-cli/bin/cordova", "platform", "add", platformPath], workdir='build/mobilespec', haltOnFailure=True, description='Platform Add')]
def build_cordovajs_steps(self):
return [
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[09/14] cordova-medic git commit: Added support of --nobuild key
Posted by sg...@apache.org.
Added support of --nobuild key
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/c1203119
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/c1203119
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/c1203119
Branch: refs/heads/master
Commit: c1203119a207d5f6abcad7fc39cde059cb411877
Parents: 8ace636
Author: maria.bukharina <ma...@akvelon.com>
Authored: Fri Oct 31 15:42:47 2014 +0300
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Fri Oct 31 15:42:47 2014 +0300
----------------------------------------------------------------------
src/build/makers/windows.js | 35 +++++++++++++++++++++++++++++------
1 file changed, 29 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/c1203119/src/build/makers/windows.js
----------------------------------------------------------------------
diff --git a/src/build/makers/windows.js b/src/build/makers/windows.js
index ddedd93..f101e3f 100644
--- a/src/build/makers/windows.js
+++ b/src/build/makers/windows.js
@@ -10,12 +10,17 @@ var shell = require('shelljs'),
module.exports = function(output, sha, entry_point, couchdb_host, test_timeout, build_target) {
+ var target_folder = ((build_target == 'store') ? 'windows' : ((build_target == 'store80') ? 'windows80' : 'phone')),
+ noBuildMarker = '<!-- no build marker -->',
+ manifestFile = path.join('platforms', 'windows', 'build', target_folder, 'debug', 'anycpu', 'AppxManifest.xml');
+
+ build_target = (build_target == 'store' || build_target == 'store80') ? 'win' : build_target;
+
+
function run() {
var d = q.defer();
log('Running app...');
- var cmd = (build_target == "store80" || build_target == "phone") ?
- '..\\cordova-cli\\bin\\cordova.cmd run -- --' + build_target :
- '..\\cordova-cli\\bin\\cordova.cmd run',
+ var cmd = '..\\cordova-cli\\bin\\cordova.cmd run windows -- --' + build_target + ' --nobuild',
logFile = sha + '.log',
errFile = sha + '.err',
endFile = sha + '.end',
@@ -99,11 +104,29 @@ module.exports = function(output, sha, entry_point, couchdb_host, test_timeout,
}
return defer.promise;
}
+
+ function build() {
+ log('Building app...');
+
+ cmd = '..\\cordova-cli\\bin\\cordova.cmd build windows -- --' + build_target;
+
+ shell.exec(cmd);
+
+ fs.appendFileSync(manifestFile, noBuildMarker, 'utf-8');
+ }
+
+ function testNoBuild() {
+ var manifestContent = fs.readFileSync(manifestFile, 'utf-8');
+
+ if (manifestContent.indexOf(noBuildMarker) === -1) {
+ throw new Error('NoBuild parameter test failed.');
+ }
+ }
return prepareMobileSpec().then(function() {
shell.cd(path.join(output, '..', '..'));
- return run();
- }).then(function() {
+ return build();
+ }).then(run).then(function() {
return testRunner.waitTestsCompleted(sha, 1000 * test_timeout);
- });
+ }).then(testNoBuild);
};
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[13/14] cordova-medic git commit: Updated documentation for
"cordova-" prefix and config.json sample
Posted by sg...@apache.org.
Updated documentation for "cordova-" prefix and config.json sample
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/9625b324
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/9625b324
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/9625b324
Branch: refs/heads/master
Commit: 9625b32406ba112498fd1a13e630d862840ca388
Parents: a23d3c9
Author: dmitriy-barkalov <v-...@microsoft.com>
Authored: Tue Nov 11 02:55:03 2014 -0800
Committer: dmitriy-barkalov <v-...@microsoft.com>
Committed: Tue Nov 11 02:55:03 2014 -0800
----------------------------------------------------------------------
README.md | 11 ++++-------
config.json.sample-windows | 27 ---------------------------
2 files changed, 4 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9625b324/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d73f9bd..d113244 100644
--- a/README.md
+++ b/README.md
@@ -60,18 +60,15 @@ medic requires grunt-cli npm package to be installed globally. You can install i
4. Stop the slave and the master
5. Add slaves:
- On Mac
- - buildslave create-slave slave_ios localhost:9889 ios-slave pass
- - buildslave create-slave slave_android localhost:9889 android-slave pass
+ - buildslave create-slave slave_ios localhost:9889 cordova-ios-slave pass
+ - buildslave create-slave slave_android localhost:9889 cordova-android-slave pass
- On Windows
- - buildslave create-slave slave_windows localhost:9889 windows-slave pass
+ - buildslave create-slave slave_windows localhost:9889 cordova-windows-slave pass
6. Get three files from the medic repository
- master.cfg - copy to buildbot/master/master.cfg
- repos.json - copy to the buildbot base directory
- - On Mac
- - config.json.sample - copy to the buildbot base directory, then edit for local ip, test platforms, ios keychain, current release build
- - On Windows
- - config.json.sample-windows - copy to the buildbot base directory, then edit for local ip
+ - config.json.sample - copy to the buildbot base directory, then edit for local ip, test platforms, ios keychain, current release build
7. Update config.json
- Replace `http://localcouchdb:5984` with CouchDB host address
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/9625b324/config.json.sample-windows
----------------------------------------------------------------------
diff --git a/config.json.sample-windows b/config.json.sample-windows
deleted file mode 100644
index a5f7a14..0000000
--- a/config.json.sample-windows
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "couchdb":{
- "host":"http://localcouchdb:5984"
- },
- "dashboard":{
- "port":8088
- },
- "app":{
- "entry":"autotest/pages/all.html",
- "platforms":"windows8,wp8,android",
- "release":"master",
- "timeout": 600
- },
- "wp8":{
- "target": "device",
- "TODO" : "add several targets support: emulators: WVGA, WXGA, 720p, 1080p or devices: default or specified by id 7988B8C3-3ADE-488d-BA3E-D052AC9DC710"
- },
- "windows8": {
- "target": "local|emulator|device"
- },
- "mail":{
- "to":["someone@someplace.com"],
- "from":"yourbuildbot@yourEmailService.com",
- "password":"yourSMTPpassword",
- "serverURL":"put your external url here"
- }
-}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[10/14] cordova-medic git commit: Merge branch 'merged-config' into
buildbot
Posted by sg...@apache.org.
Merge branch 'merged-config' into buildbot
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/98e3d2b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/98e3d2b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/98e3d2b0
Branch: refs/heads/master
Commit: 98e3d2b06bfbe3bd9e199e433712a093c39e72bb
Parents: c120311 17ddd9b
Author: maria.bukharina <ma...@akvelon.com>
Authored: Thu Nov 6 20:52:40 2014 +0300
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Thu Nov 6 20:52:40 2014 +0300
----------------------------------------------------------------------
config.json.sample | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[02/14] cordova-medic git commit: Added platfromVersion from
platfrom/VERSION file to Grunt step. Fixed: Running grunt in cordova-js
folder failed
Posted by sg...@apache.org.
Added platfromVersion from platfrom/VERSION file to Grunt step.
Fixed: Running grunt in cordova-js folder failed
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/8e6e2b6e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/8e6e2b6e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/8e6e2b6e
Branch: refs/heads/master
Commit: 8e6e2b6e67c45d4ebf255eebd3f4db21af590d1a
Parents: cfb3616
Author: maria.bukharina <ma...@akvelon.com>
Authored: Tue Oct 7 19:13:11 2014 +0400
Committer: maria.bukharina <ma...@akvelon.com>
Committed: Tue Oct 7 19:13:11 2014 +0400
----------------------------------------------------------------------
build_js.js | 14 ++++++++++++++
master.cfg | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8e6e2b6e/build_js.js
----------------------------------------------------------------------
diff --git a/build_js.js b/build_js.js
new file mode 100644
index 0000000..bfbfdae
--- /dev/null
+++ b/build_js.js
@@ -0,0 +1,14 @@
+var fs = require('fs');
+var exec = require('child_process').exec;
+var child;
+
+if(process.argv.slice(2)[0] == 'windows8') {
+ var versionPath = '../cordova-windows/version';
+}
+else {
+ var versionPath = '../cordova-' + process.argv.slice(2)[0] + '/version';
+}
+
+var versionContents = fs.readFileSync(versionPath, "utf-8");
+child = exec('grunt --platformVersion=' + versionContents, function(err,stdout,stderr){
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/8e6e2b6e/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 6177748..82cde0d 100644
--- a/master.cfg
+++ b/master.cfg
@@ -233,7 +233,7 @@ class PlatformTestBase(object):
def build_cordovajs_steps(self):
return [
ShellCommand(command=["npm", "install"], workdir='build/cordova-js', description='Install Grunt'),
- ShellCommand(command=["grunt"], workdir='build/cordova-js', description='Grunt')
+ ShellCommand(command=["node", "../medic/build_js.js", self.platform], workdir='build/cordova-js', description='Grunt')
]
def prepare_mobilespec_steps(self):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org