From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24372 invoked by alias); 19 Jun 2006 22:09:01 -0000 Received: (qmail 24360 invoked by uid 22791); 19 Jun 2006 22:09:00 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 19 Jun 2006 22:08:57 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5JM8thg019319 for ; Mon, 19 Jun 2006 18:08:55 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5JM8o3f002599 for ; Mon, 19 Jun 2006 18:08:50 -0400 Received: from tony.toronto.redhat.com (tony.toronto.redhat.com [172.16.14.158]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k5JM8nve009456 for ; Mon, 19 Jun 2006 18:08:49 -0400 Subject: Harness XML output improvements From: Anthony Balkissoon To: mauve-patches@sources.redhat.com Content-Type: text/plain Date: Mon, 19 Jun 2006 22:09:00 -0000 Message-Id: <1150754929.25174.62.camel@tony.toronto.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2006/txt/msg00437.txt.bz2 This patch improves the XML output from the Harness to be as verbose as the standard output. Includes line numbers for passes and fails, and stack traces for uncaught exceptions. 2006-06-19 Anthony Balkissoon * RunnerProcess.java: (lastFailureMessage): New field. (runtest): Strip the "gnu.testlet" from the name passed to the TestResult. Also use the new 3 parameter TestResult.addException to pass the stack trace to the TestResult. Properly indent the stack trace when printing exception details. (getStackTraceString): New method. (fail): Get the description from check2 and add the full failure string to the TestResult. (check(Object, Object)): Likewise. (check(boolean, boolean)): Likewise. (check(int, int)): Likewise. (check(long, long)): Likewise. (check(boolean)): Likewise. (check2): Return the description. Do not add the failure description to the TestResult here, do it in the individual check() methods so that a full description can be added. Use the new TestResult.addPass(String) method instead of the old no argument method. * TestReport.java: (writeXML): Do not write the passCount value, write the passes as well as the fails, and write the stack traces for exceptions. Properly indent the xml. * TestResult.java: (passCount): Removed this field. (passMessages): New field. (exceptionReason): New field. (addPass): Now takes in a String argument, acts just like addFail(). Descriptions are taken in for passes as well as fails. (addException): Now takes 3 arguments instead of 2, the new argument is the stack trace for the exception. (getPassCount): Returns the size of the passMessages ArrayList. (getPassMessages): New method. (getExceptionReason): Likewise. --Tony