Mercurial > hg > release > icedtea-web-1.3
changeset 430:7b8a05e4443c
handle ignored tests in xml and html outputs correctly
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 13 Jun 2012 15:30:28 +0200 |
parents | 40776f2e940f |
children | 2c788a60aa65 |
files | ChangeLog tests/junit-runner/JunitLikeXmlOutputListener.java tests/report-styles/jreport.xsl |
diffstat | 3 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jun 12 15:25:44 2012 -0400 +++ b/ChangeLog Wed Jun 13 15:30:28 2012 +0200 @@ -1,3 +1,10 @@ +2012-06-13 Jiri Vanek <jvanek@redhat.com> + + * tests/junit-runner/JunitLikeXmlOutputListener.java: + Introduced TEST_IGNORED_ATTRIBUTE to mark test as ignored if should be. + * tests/report-styles/jreport.xsl: Applied correct text and style for + tests with attribute ignored. + 2012-06-12 Adam Domurad <adomurad@redhat.com> Fixes PR722, javaws failing to run with unsigned content in META-INF/
--- a/tests/junit-runner/JunitLikeXmlOutputListener.java Tue Jun 12 15:25:44 2012 -0400 +++ b/tests/junit-runner/JunitLikeXmlOutputListener.java Wed Jun 13 15:30:28 2012 +0200 @@ -51,6 +51,7 @@ private static final String K2F = "known-to-fail"; private static final String TEST_NAME_ATTRIBUTE = "name"; private static final String TEST_TIME_ATTRIBUTE = "time"; + private static final String TEST_IGNORED_ATTRIBUTE = "ignored"; private static final String TEST_ERROR_ELEMENT = "error"; private static final String TEST_CLASS_ATTRIBUTE = "classname"; private static final String ERROR_MESSAGE_ATTRIBUTE = "message"; @@ -193,6 +194,9 @@ testcaseAtts.put(TEST_TIME_ATTRIBUTE, stringedTime); testcaseAtts.put(TEST_CLASS_ATTRIBUTE, description.getClassName()); testcaseAtts.put(TEST_NAME_ATTRIBUTE, description.getMethodName()); + if (ignored){ + testcaseAtts.put(TEST_IGNORED_ATTRIBUTE, Boolean.TRUE.toString()); + } KnownToFail k2f=null; try { if (testClass != null && testMethod != null) {
--- a/tests/report-styles/jreport.xsl Tue Jun 12 15:25:44 2012 -0400 +++ b/tests/report-styles/jreport.xsl Wed Jun 13 15:30:28 2012 +0200 @@ -201,6 +201,9 @@ <div> <xsl:attribute name="class"> <xsl:choose> + <xsl:when test="@ignored"> + ignored + </xsl:when> <xsl:when test="error"> failed </xsl:when> @@ -246,7 +249,14 @@ <xsl:choose> <xsl:when test="not(error)"> <div class="status"> - PASSED (<xsl:value-of select="@time"/>s) + <xsl:choose> + <xsl:when test="@ignored"> + IGNORED (<xsl:value-of select="@time"/>s) + </xsl:when> + <xsl:otherwise> + PASSED (<xsl:value-of select="@time"/>s) + </xsl:otherwise> + </xsl:choose> <xsl:choose> <xsl:when test="@known-to-fail"> <xsl:choose>