summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-10-14 06:35:13 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-10-14 06:35:13 +0000
commitb4f2f93e6519748cae06863d49e9003309ecbca0 (patch)
tree1de000bfd8513d0f9e782669c5a197933a5ef3fc /share/www/script
parentb9acb985cc532cc444474d07d86e7b4051dd64c3 (diff)
dont save so many test reports
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@825021 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/couch_test_runner.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js
index a71ff82f..a5ece9cd 100644
--- a/share/www/script/couch_test_runner.js
+++ b/share/www/script/couch_test_runner.js
@@ -51,7 +51,9 @@ function runAllTests() {
runTest($("th button", row).get(0), function() {
offset += 1;
setTimeout(runNext, 100);
- });
+ }, false, true);
+ } else {
+ saveTestReport();
}
}
runNext();
@@ -60,7 +62,7 @@ function runAllTests() {
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 @@ function runTest(button, callback, debug) {
updateTestsFooter();
currentRow = null;
if (callback) callback();
+ if (!noSave) saveTestReport();
}
$("td.status", row).addClass("running").text("running…");
setTimeout(run, 100);
@@ -146,15 +149,13 @@ function updateTestsFooter() {
$("#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 saveTestReport() {
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 @@ function testPlatform() {
return {"browser" : bs[i], "version" : b.version};
}
};
+ return {"browser" : "undetected"};
}