You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dr...@apache.org on 2013/10/15 20:39:50 UTC
[09/31] git commit: ccleanup URLs and test completion
ccleanup URLs and test completion
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/a316f618
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/a316f618
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/a316f618
Branch: refs/heads/master
Commit: a316f6186b2618f5f2d4217149817d1de22f34be
Parents: a64c9b3
Author: David Kemp <dr...@google.com>
Authored: Thu Aug 22 09:56:34 2013 -0400
Committer: David Kemp <dr...@chromium.org>
Committed: Tue Oct 15 14:11:15 2013 -0400
----------------------------------------------------------------------
src/build/makers/ios/deploy.js | 16 +++++++++++-----
src/build/makers/mobile_spec/jasmine-jsreporter.js | 12 ++++++------
2 files changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/a316f618/src/build/makers/ios/deploy.js
----------------------------------------------------------------------
diff --git a/src/build/makers/ios/deploy.js b/src/build/makers/ios/deploy.js
index 9256b94..676c60f 100644
--- a/src/build/makers/ios/deploy.js
+++ b/src/build/makers/ios/deploy.js
@@ -24,6 +24,7 @@ var fruitstrap = path.join(root, 'node_modules', 'fruitstrap', 'fruitstrap');
// current fruitstrap dependency has two binaries, uninstall exists under the "listdevices" one
var listdevices = path.join(root, 'node_modules', 'fruitstrap', 'listdevices');
var failures=false;
+var logged_url=false;
function kill(process, buf, sha, device_id) {
if (buf.indexOf('>>> DONE <<<') > -1) {
@@ -35,15 +36,19 @@ function kill(process, buf, sha, device_id) {
process.kill();
failures=true;
return true;
- } else if (buf.indexOf('[[[ TEST OK ]]]') > -1) {
- process.kill();
- return true;
+// } else if (buf.indexOf('[[[ TEST OK ]]]') > -1) {
+// process.kill();
+// return true;
} else if (buf.indexOf('[[[ TEST FAILED ]]]') > -1) {
process.kill();
failures=true;
return true;
- } else if (buf.indexOf('Test Results URL') >-1) {
- console.log(buf);
+ } else if (!logged_url && buf.indexOf(' <<<end test result>>>')>-1 && buf.indexOf('Test Results URL') >-1) {
+ var msgend=buf.indexOf(' <<<end test result>>>');
+ var msgstart =buf.indexOf('Test Results URL');
+ var msg = buf.slice(msgstart,msgend);
+ console.log(msg);
+ logged_url=true;
}
return false;
}
@@ -54,6 +59,7 @@ function run_through(sha, devices, bundlePath, bundleId, callback) {
}
var d = devices.shift();
if (d) {
+ logged_url=false;
log('Uninstalling app on ' + d);
var cmd = listdevices + ' uninstall --id=' + d + ' --bundle-id=org.apache.cordova.example';
shell.exec(cmd, {silent:true,async:true}, function(code, output) {
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/a316f618/src/build/makers/mobile_spec/jasmine-jsreporter.js
----------------------------------------------------------------------
diff --git a/src/build/makers/mobile_spec/jasmine-jsreporter.js b/src/build/makers/mobile_spec/jasmine-jsreporter.js
index 4bbb1c0..c804651 100644
--- a/src/build/makers/mobile_spec/jasmine-jsreporter.js
+++ b/src/build/makers/mobile_spec/jasmine-jsreporter.js
@@ -111,11 +111,6 @@ limitations under the License.
reportRunnerResults: function (runner) {
var p = device.platform.toLowerCase();
- if(!(jasmine.runnerResults.failed)) {
- console.log('[[[ TEST OK ]]]');
- } else {
- console.log('[[[ TEST FAILED ]]]');
- }
this.postTests({
mobilespec:jasmine.runnerResults,
sha:library_sha,
@@ -131,7 +126,7 @@ limitations under the License.
var doc_id = [ library_sha, json.version, json.model].map(encodeURIComponent).join('__');
// TODO: expose the db in this url for customization
var doc_url = this.server + '/mobilespec_results/' + doc_id;
- console.log('Test Results URL = '+doc_url);
+ console.log('Test Results URL = '+doc_url+' <<<end test result>>>');
xhr.open("PUT", doc_url, true);
xhr.onreadystatechange=function() {
console.log('onreadystatechange');
@@ -163,6 +158,11 @@ limitations under the License.
x_h_r.onreadystatechange=function() {
if (x_h_r.readyState==4) {
if (x_h_r.status==201) {
+ if(!(jasmine.runnerResults.failed)) {
+ console.log('[[[ TEST OK ]]]');
+ } else {
+ console.log('[[[ TEST FAILED ]]]');
+ }
console.log('>>> DONE <<<');
if (blackberry && blackberry.app && blackberry.app.exit) blackberry.app.exit();
} else {