/hg/gfx-test: Added image comparator used for tests results gene...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Jul 13 05:07:44 PDT 2010


changeset 21a00e2fa19e in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=21a00e2fa19e
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jul 13 14:07:51 2010 +0200

	Added image comparator used for tests results generation.


diffstat:

3 files changed, 113 insertions(+), 1 deletion(-)
Makefile                       |    6 +++-
template_different_images.html |   54 ++++++++++++++++++++++++++++++++++++++++
template_same_images.html      |   54 ++++++++++++++++++++++++++++++++++++++++

diffs (146 lines):

diff -r a616bbdb494c -r 21a00e2fa19e Lupic.jar
Binary file Lupic.jar has changed
diff -r a616bbdb494c -r 21a00e2fa19e Makefile
--- a/Makefile	Mon Jul 12 13:36:50 2010 +0200
+++ b/Makefile	Tue Jul 13 14:07:51 2010 +0200
@@ -39,6 +39,7 @@ SOURCEPATH=src
 SOURCEPATH=src
 CLASSES=build
 OUTPUT=output
+RESULTS=results
 FRAMEWORK_DIR=org/gfxtest/framework
 TESTSUITE_DIR=org/gfxtest/testsuites
 TEST_PACKAGE=org.gfxtest.testsuites
@@ -101,7 +102,9 @@ runtests:	gfxtest.jar $(TESTSUITES)
 	$(JAVA) -cp gfxtest.jar $(TEST_PACKAGE).$@ $(RUN_OPTIONS)
 
 compareresults:
-	echo "***TODO***"
+	mkdir -p $(RESULTS)
+	mkdir -p masks
+	java -jar Lupic.jar -s1=samples -s2=output -m=masks -b=bitmap-masks -o=results --html --html-results --xml-results --diff-images --struct-diff-images
 
 cleanall:	clean clean-results
 
@@ -113,4 +116,5 @@ clean:
 
 clean-results:
 	rm -rf $(OUTPUT)
+	rm -rf $(RESULTS)
 
diff -r a616bbdb494c -r 21a00e2fa19e template_different_images.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/template_different_images.html	Tue Jul 13 14:07:51 2010 +0200
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <title>${TestName}</title>
+        <meta name="Author" content="Pavel Tisnovsky" />
+        <meta name="Generator" content="ImageDiffer" />
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <meta name="keywords" content="test, java" />
+        <style type="text/css">
+            <!--
+            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
+            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
+            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
+            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
+            a:link         {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:hover        {color:#ffffff; background:#404040}
+            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
+            .key           {color: #0000aa}
+            .value         {color: #aa0000}
+            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
+            -->
+        </style>
+    </head>
+    <body>
+        <h1>${TestName}</h2>
+        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
+            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
+                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
+            </tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
+            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
+            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
+            <tr><td class="key">Masked pixels:                 </td><td class="value">${MaskedPixels}</td></tr>
+            <tr><td class="key">Perceptible pixels:            </td><td class="value">${PerceptibleDiffs}</td></tr>
+            <tr><td class="key">Global different pixels:       </td><td class="value">${DifferentPixels}</td></tr>
+            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
+            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
+            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
+            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
+        </table>
+        <br clear="all" />
+        <hr noshade size="1" width="100%" />
+        <p>Generated by <strong>ImageDiffer</strong></p>
+    </body>
+</html>
+
diff -r a616bbdb494c -r 21a00e2fa19e template_same_images.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/template_same_images.html	Tue Jul 13 14:07:51 2010 +0200
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <title>${TestName}</title>
+        <meta name="Author" content="Pavel Tisnovsky" />
+        <meta name="Generator" content="ImageDiffer" />
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <meta name="keywords" content="test, java" />
+        <style type="text/css">
+            <!--
+            body           {font-family: sans-serif, arial, helvetica, sans-serif; color:#000000; background-color:#ffffff; margin-left: 0px; margin-top: 0px; border:1px; border-color:#808080;border-style:solid}
+            h1             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; text-align:center; padding-left: 1em; margin: 0}
+            h2             {font-family: arial, helvetica, sans-serif; color:#000000; background:#80a0a0; padding-left: 1em; padding-right: 1cm}
+            a              {font-family: arial, helvetica, sans-serif; color:#0000ff; text-decoration:none}
+            a:link         {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:visited      {color:#0000ff}
+            a:hover        {color:#ffffff; background:#404040}
+            p              {font-family: arial, helvetica, sans-serif; color:#000000; text-align:justify; padding-left: 1em; padding-right: 1em}
+            .key           {color: #0000aa}
+            .value         {color: #aa0000}
+            .formular      {background-color: #f0f0dd; vertical-align: top; border-collapse: collapse; border-color:#808080}
+            -->
+        </style>
+    </head>
+    <body>
+        <h1>${TestName}</h2>
+        <table border="0" frame="border" cellspacing="3" cellpadding="1" class="formular" summary="">
+            <tr><td class="key">Test result:                   </td><td class="value">${ComparisonStatus}</td>
+                <td rowspan="14"><a href="source1.png"><img src="source1.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="source2.png"><img src="source2.png" width="300px" /></a></td>
+                <td rowspan="14"><a href="diff.png"><img src="diff.png" width="300px" /></a></td>
+            </tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Tested area:                   </td><td class="value">${AreaAsString}</td></tr>
+            <tr><td class="key">Different pixels area:         </td><td class="value">${RectangleAsString}</td></tr>
+            <tr><td class="key">Total pixels:                  </td><td class="value">${TotalPixels}</td></tr>
+            <tr><td class="key">Masked pixels:                 </td><td class="value">${MaskedPixels}</td></tr>
+            <tr><td class="key">Perceptible pixels:            </td><td class="value">${PerceptibleDiffs}</td></tr>
+            <tr><td class="key">Global different pixels:       </td><td class="value">${DifferentPixels}</td></tr>
+            <tr><td class="key">Unperceptible different pixels:</td><td class="value">${SmallDifferences}</td></tr>
+            <tr><td class="key">Same pixels:                   </td><td class="value">${EqualPixels}</td></tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr><td class="key">Template (source image1)       </td><td><a href="source1.png">source1.png</a></td></tr>
+            <tr><td class="key">Test sample (source image2)    </td><td><a href="source2.png">source2.png</a></td></tr>
+            <tr><td class="key">Diff. image                    </td><td><a href="diff.png">diff.png</a></td></tr>
+        </table>
+        <br clear="all" />
+        <hr noshade size="1" width="100%" />
+        <p>Generated by <strong>ImageDiffer</strong></p>
+    </body>
+</html>
+



More information about the distro-pkg-dev mailing list