diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-10-14 06:35:04 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-10-14 06:35:04 +0000 |
commit | c829bc5fc3db8e9b08e5376362032fef4fc57fa3 (patch) | |
tree | 1921082ec5eb7ccf37129f7a927de117b5113576 /share | |
parent | f7e36955a250f759fbe172bb2672a44ec8c167fd (diff) |
tests not loading
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@825018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r-- | share/www/couch_tests.html | 2 | ||||
-rw-r--r-- | share/www/script/couch_test_runner.js | 50 |
2 files changed, 23 insertions, 29 deletions
diff --git a/share/www/couch_tests.html b/share/www/couch_tests.html index 76191938..173e9cb3 100644 --- a/share/www/couch_tests.html +++ b/share/www/couch_tests.html @@ -37,7 +37,7 @@ specific language governing permissions and limitations under the License. }); }); 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"> diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js index 431c0aa7..221d83d1 100644 --- a/share/www/script/couch_test_runner.js +++ b/share/www/script/couch_test_runner.js @@ -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 @@ function updateTestsFooter() { $("#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 updateTestsFooter() { 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 @@ function saveTestReport() { 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 testPlatform() { 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 @@ function repr(val) { return JSON.stringify(val); } } + |