couchdb-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=825018&view=rev
Log:
tests not loading

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

Modified: couchdb/trunk/share/www/couch_tests.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/couch_tests.html?rev=825018&r1=825017&r2=825018&view=diff
==============================================================================
--- couchdb/trunk/share/www/couch_tests.html [utf-8] (original)
+++ couchdb/trunk/share/www/couch_tests.html [utf-8] Wed Oct 14 06:35:04 2009
@@ -37,7 +37,7 @@
         });
       });
       var testsPath = document.location.toString().split('?')[1];
-      loadScript(testsPath||"script/couch_tests.js")
+      loadScript(testsPath||"script/couch_tests.js");
     </script>
   </head>
   <body><div id="wrap">

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=825018&r1=825017&r2=825018&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:04 2009
@@ -12,6 +12,7 @@
 
 // *********************** Test Framework of Sorts ************************* //
 
+
 function loadScript(url) {
   if (typeof document != "undefined") document.write('<script src="'+url+'"></script>');
 };
@@ -145,12 +146,6 @@
   $("#tests tbody.footer td").html("<span>"+testsRun.length + " of " + tests.length
+
     " test(s) run, " + testsFailed.length + " failures (" +
     totalDuration + " ms)</span> ");
-  if (testsFailed.length > 0) {
-    $("#tests tbody.footer td").append($('<a href="#">Click to Report Test Failures</a>').click(function(e)
{
-      e.preventDefault();
-      reportTests();
-    }));
-  }
 }
 
 // make report and save to local db
@@ -159,9 +154,7 @@
 
 function saveTestReport() {
   var subject = $("#tests tbody.footer td").text();
-  var report = {
-    "failures" : failureList
-  }
+  var report = makeTestReport();
   var db = $.couch.db("test_suite_reports");
   var saveReport = function() {
     db.saveDoc(report);        
@@ -169,9 +162,9 @@
   db.create({error: saveReport, success: saveReport});
 };
 
-function testReport() {
-  var report = [];
-  report.push(testPlatform()+"\n");
+function makeTestReport() {
+  var report = {};
+  report.platform = testPlatform());
   $("#tests tbody.content tr").each(function() {
     var status = $("td.status", this).text();
     if (status != "not run") {
@@ -198,22 +191,22 @@
 
 
 function reportTests() {
-  var summary = $("#tests tbody.footer td span").text();
-  var report = testReport();
-  var uri = "http://groups.google.com/group/couchdb-test-report/post"
-    + "?subject=" + escape(summary);  
-
-  var d=document;
-  var f=d.createElement("form");
-  // f.style.display='none';
-  f.action=uri;
-  f.method="POST";f.target="_blank";
-  var t=d.createElement("textarea");
-  t.name="body";
-  t.value=report;
-  f.appendChild(t);
-  d.body.appendChild(f);
-  f.submit();
+  // var summary = $("#tests tbody.footer td span").text();
+  // var report = makeTestReport();
+  // var uri = "http://groups.google.com/group/couchdb-test-report/post"
+  //   + "?subject=" + escape(summary);  
+  // 
+  // var d=document;
+  // var f=d.createElement("form");
+  // // f.style.display='none';
+  // f.action=uri;
+  // f.method="POST";f.target="_blank";
+  // var t=d.createElement("textarea");
+  // t.name="body";
+  // t.value=report;
+  // f.appendChild(t);
+  // d.body.appendChild(f);
+  // f.submit();
 }
 
 // Use T to perform a test that returns false on failure and if the test fails,
@@ -257,3 +250,4 @@
     return JSON.stringify(val);
   }
 }
+



Mime
View raw message