couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r825021 - /couchdb/trunk/share/www/script/couch_test_runner.js
Date Wed, 14 Oct 2009 06:35:14 GMT
Author: jchris
Date: Wed Oct 14 06:35:13 2009
New Revision: 825021

URL: http://svn.apache.org/viewvc?rev=825021&view=rev
Log:
dont save so many test reports

Modified:
    couchdb/trunk/share/www/script/couch_test_runner.js

Modified: couchdb/trunk/share/www/script/couch_test_runner.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/couch_test_runner.js?rev=825021&r1=825020&r2=825021&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/couch_test_runner.js (original)
+++ couchdb/trunk/share/www/script/couch_test_runner.js Wed Oct 14 06:35:13 2009
@@ -51,7 +51,9 @@
       runTest($("th button", row).get(0), function() {
         offset += 1;
         setTimeout(runNext, 100);
-      });
+      }, false, true);
+    } else {
+      saveTestReport();
     }
   }
   runNext();
@@ -60,7 +62,7 @@
 var numFailures = 0;
 var currentRow = null;
 
-function runTest(button, callback, debug) {
+function runTest(button, callback, debug, noSave) {
   if (currentRow != null) {
     alert("Can not run multiple tests simultaneously.");
     return;
@@ -102,6 +104,7 @@
     updateTestsFooter();
     currentRow = null;
     if (callback) callback();
+    if (!noSave) saveTestReport();
   }
   $("td.status", row).addClass("running").text("running…");
   setTimeout(run, 100);
@@ -146,15 +149,13 @@
   $("#tests tbody.footer td").html("<span>"+testsRun.length + " of " + tests.length
+
     " test(s) run, " + testsFailed.length + " failures (" +
     totalDuration + " ms)</span> ");
-  saveTestReport();
 }
 
 // make report and save to local db
 // display how many reports need replicating to the mothership
 // have button to replicate them
 
-function saveTestReport() {
-  var subject = $("#tests tbody.footer td").text();
+function saveTestReport(report) {
   var report = makeTestReport();
   if (report) {
     var db = $.couch.db("test_suite_reports");
@@ -176,6 +177,7 @@
 
 function makeTestReport() {
   var report = {};
+  report.summary = $("#tests tbody.footer td").text();
   report.platform = testPlatform();
   var date = new Date();
   report.timestamp = date.getTime();
@@ -209,6 +211,7 @@
       return {"browser" : bs[i], "version" : b.version};
     }
   };
+  return {"browser" : "undetected"};
 }
 
 



Mime
View raw message