Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 67999 invoked from network); 12 Oct 2009 05:03:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Oct 2009 05:03:56 -0000 Received: (qmail 30356 invoked by uid 500); 12 Oct 2009 05:03:56 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 30249 invoked by uid 500); 12 Oct 2009 05:03:55 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 30239 invoked by uid 99); 12 Oct 2009 05:03:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 05:03:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.211.183 as permitted sender) Received: from [209.85.211.183] (HELO mail-yw0-f183.google.com) (209.85.211.183) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 05:03:47 +0000 Received: by ywh13 with SMTP id 13so4598243ywh.29 for ; Sun, 11 Oct 2009 22:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=p+SelMN4k5ecZzxkpcY8y034FMb0IsLv+SKLnWQtRt8=; b=Oq5M9YoEl/jOarUT+wKdEmCiUFljaOEDq3xmixz9aCMjzSy8iT4Vezhrf8YSX88SQE jPpGzi+fZ6y8HUDU/ygv6NXGieoCYW9q+yJ1FDzHeVqi/pNnZ8sIQ9aHkNv0B6GhnvCG 04b6KDWnahiaFmZ9DQEH32bdPMk4A9klZltB4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=xyWB8/sYhqzLsIYr5aFDpK5hlg7HMHW1cFpIY6/Gdh13gAHR+cc4WARTXqO8VldP/n N8n2FFPgSarWccl0t4i61BTVkYCysr1UpFvYvcsCHKfUqVeEsQ305Vu2Shwa+Gmctabr EJvNn6TJoG3xNgkNCKTib6K2Q2j3b2wG8kwLs= MIME-Version: 1.0 Received: by 10.101.81.8 with SMTP id i8mr4997501anl.185.1255323805911; Sun, 11 Oct 2009 22:03:25 -0700 (PDT) In-Reply-To: <20091012045959.2456223888DB@eris.apache.org> References: <20091012045959.2456223888DB@eris.apache.org> Date: Mon, 12 Oct 2009 01:03:25 -0400 Message-ID: Subject: Re: svn commit: r824224 - /couchdb/trunk/share/www/script/couch_test_runner.js From: Paul Davis To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Oct 12, 2009 at 12:59 AM, wrote: > Author: jchris > Date: Mon Oct 12 04:59:58 2009 > New Revision: 824224 > > URL: http://svn.apache.org/viewvc?rev=3D824224&view=3Drev > Log: > link to submit test failures to a google group > > Modified: > =A0 =A0couchdb/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_te= st_runner.js?rev=3D824224&r1=3D824223&r2=3D824224&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- couchdb/trunk/share/www/script/couch_test_runner.js (original) > +++ couchdb/trunk/share/www/script/couch_test_runner.js Mon Oct 12 04:59:= 58 2009 > @@ -142,9 +142,63 @@ > =A0 =A0 var text =3D $(this).text(); > =A0 =A0 totalDuration +=3D parseInt(text.substr(0, text.length - 2), 10); > =A0 }); > - =A0$("#tests tbody.footer td").text(testsRun.length + " of " + tests.le= ngth + > + =A0$("#tests tbody.footer td").html(""+testsRun.length + " of " += tests.length + > =A0 =A0 " test(s) run, " + testsFailed.length + " failures (" + > - =A0 =A0totalDuration + " ms)"); > + =A0 =A0totalDuration + " ms) "); > + =A0if (testsFailed.length > 0) { > + =A0 =A0$("#tests tbody.footer td").append($('Click to Rep= ort Test Failures').click(function(e) { > + =A0 =A0 =A0e.preventDefault(); > + =A0 =A0 =A0reportTests(); > + =A0 =A0})); > + =A0} > +} > + > + > +function testReport() { > + =A0var report =3D []; > + =A0report.push(testPlatform()+"\n"); > + =A0$("#tests tbody.content tr").each(function() { > + =A0 =A0var status =3D $("td.status", this).text(); > + =A0 =A0if (status !=3D "not run") { > + =A0 =A0 =A0var dur =3D $("td.duration", this).text(); > + =A0 =A0 =A0report.push(this.id+"\n =A0"+status+" "+dur); > + =A0 =A0 =A0var details =3D []; > + =A0 =A0 =A0$("td.details li", this).each(function() { > + =A0 =A0 =A0 =A0report.push(" =A0 =A0"+$(this).text()); > + =A0 =A0 =A0}); > + =A0 =A0} > + =A0}); > + =A0return report.join("\n"); > +}; > + > +function testPlatform() { > + =A0var b =3D $.browser; > + =A0var bs =3D ["mozilla", "msie", "opera", "safari"]; > + =A0for (var i=3D0; i < bs.length; i++) { > + =A0 =A0if (b[bs[i]]) { > + =A0 =A0 =A0return "Platform: "+ bs[i] + " " + b.version; > + =A0 =A0} > + =A0}; > +} > + > + > +function reportTests() { > + =A0var summary =3D $("#tests tbody.footer td span").text(); > + =A0var report =3D testReport(); > + =A0var uri =3D "http://groups.google.com/group/couchdb-test-report/post= " > + =A0 =A0+ "?subject=3D" + escape(summary); > + > + =A0var d=3Ddocument; > + =A0var f=3Dd.createElement("form"); > + =A0// f.style.display=3D'none'; > + =A0f.action=3Duri; > + =A0f.method=3D"POST";f.target=3D"_blank"; > + =A0var t=3Dd.createElement("textarea"); > + =A0t.name=3D"body"; > + =A0t.value=3Dreport; > + =A0f.appendChild(t); > + =A0d.body.appendChild(f); > + =A0f.submit(); > =A0} > > =A0// Use T to perform a test that returns false on failure and if the te= st fails, > @@ -157,8 +211,9 @@ > =A0 =A0 =A0 if ($("td.details ol", currentRow).length =3D=3D 0) { > =A0 =A0 =A0 =A0 $("
    ").appendTo($("td.details", currentRow)); > =A0 =A0 =A0 } > + =A0 =A0 =A0var message =3D (arg2 !=3D null ? arg2 : arg1).toString(); > =A0 =A0 =A0 $("
  1. Assertion " + (testName ? "'" + testName + "'" : ""= ) + " failed:
  2. ") > - =A0 =A0 =A0 =A0.find("code").text((arg2 !=3D null ? arg2 : arg1).toStri= ng()).end() > + =A0 =A0 =A0 =A0.find("code").text(message).end() > =A0 =A0 =A0 =A0 .appendTo($("td.details ol", currentRow)); > =A0 =A0 } > =A0 =A0 numFailures +=3D 1 > > > Awesome idea. Though, I'd vote for creating an Appengine app to allow things like counts per browser and test and searching and more awesome. Emails seem like I'm gonna ignore them after five. Paul