[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29835] branches/soc-2010-leifandersen/ tests/render/run.py: One last commit today:

Leif Andersen leif.a.andersen at gmail.com
Thu Jul 1 02:36:51 CEST 2010


Revision: 29835
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29835
Author:   leifandersen
Date:     2010-07-01 02:36:50 +0200 (Thu, 01 Jul 2010)

Log Message:
-----------
One last commit today:

1.  A few UI improvments on the outputted HTML webpage

a.  OK is green, FAIL is red.

b.  The blender homepage navbar is now at the top.  TODO:  Implement the CSS needed to make it flush with the webpage (like the sphinx documentation).

Modified Paths:
--------------
    branches/soc-2010-leifandersen/tests/render/run.py

Modified: branches/soc-2010-leifandersen/tests/render/run.py
===================================================================
--- branches/soc-2010-leifandersen/tests/render/run.py	2010-06-30 19:35:08 UTC (rev 29834)
+++ branches/soc-2010-leifandersen/tests/render/run.py	2010-07-01 00:36:50 UTC (rev 29835)
@@ -5,9 +5,9 @@
 import string
 
 # My blender path, TODO remove:
-# BLENDER_BIN = "/home/leif/blender-svn/blender-build/bin/blender"
+BLENDER_BIN = "/home/leif/blender-svn/blender-build/bin/blender"
 
-BLENDER_BIN = "blender"
+#BLENDER_BIN = "blender"
 
 def render(filename):
     command = BLENDER_BIN + " -b " + os.path.join(sys.path[0], filename) + " -o " + os.path.join(sys.path[0], "output", (string.replace(filename, '.blend', '') + "_####")) + " -F PNG -x 1 -f 1"
@@ -34,7 +34,7 @@
                 im1_red+=self.im1.getpixel((i,j))[0]
                 im2_red+=self.im2.getpixel((i,j))[0]
         im_red = abs(im1_red-im2_red)
-        if im_red > 100:
+        if im_red > 1000:
             self.fail("Red band is too different")
 
     def test_green(self):
@@ -45,7 +45,7 @@
                 im1_green+=self.im1.getpixel((i,j))[1]
                 im2_green+=self.im2.getpixel((i,j))[1]
         im_green = abs(im1_green-im2_green)
-        if im_green > 100:
+        if im_green > 1000:
             self.fail("Green band is too different")
 
     def test_blue(self):
@@ -56,7 +56,7 @@
                 im1_blue+=self.im1.getpixel((i,j))[2]
                 im2_blue+=self.im2.getpixel((i,j))[2]
         im_blue = abs(im1_blue-im2_blue)
-        if im_blue > 100:
+        if im_blue > 1000:
             self.fail("Blue band is too different")
 
 
@@ -115,7 +115,9 @@
         #Setting up the HTML File
         file = open(os.path.join(sys.path[0],"index.html"), "w")
         file.write('<html><head><title>Render Test Output</title></head>\n')
-        file.write('<body>\n<table border="1">\n')
+        file.write('<body>\n')
+        file.write('<div class="noprint" id="navcontainer"><a href="http://www.blender.org/"><img width="140" height="50" title="blender.org home page" alt="blender.org home page" src="http://www.blender.org/fileadmin/site/_gfx/nav-home.png"></a><a href="http://www.blender.org/features-gallery/"><img width="140" height="50" title="Features & Gallery" alt="Features & Gallery" src="http://www.blender.org/fileadmin/site/_gfx/nav-features.png"></a><a href="http://www.blender.org/download/get-blender/"><img width="140" height="50" title="Download" alt="Download" src="http://www.blender.org/fileadmin/site/_gfx/nav-download.png"></a><a href="http://www.blender.org/education-help/"><img width="140" height="50" title="Tutorials & Help" alt="Tutorials & Help" src="http://www.blender.org/fileadmin/site/_gfx/nav-help.png"></a><a href="http://www.blender.org/community/user-community/"><img width="140" height="50" title="Community" alt="Community" src="http://www.blender.org/fileadmin/site/_gfx/nav-community.png"></a><a href="http://www.blender.org/development/"><img width="140" height="50" title="Development" alt="Development" src="http://www.blender.org/fileadmin/site/_gfx/nav-development-on.png"></a><a href="http://www.blender.org/e-shop/"><img width="140" height="50" title="e-Shop" alt="e-Shop" src="http://www.blender.org/fileadmin/site/_gfx/nav-eshop.png"></a></div> ')
+        file.write('<table border="1">\n')
         file.write('<tr>\n')
         file.write('<th>Filename</th>\n')
         file.write('<th>Good Image</th>\n')
@@ -138,10 +140,10 @@
                 file.write('<td><img src="' + os.path.join('output', string.replace(filename, '.blend', '_0001.png')) + '" alt="Latest Render" width="200" height="150"></td>\n')
                 if tr.wasSuccessful():
                     passed.append(filename)
-                    file.write('<td>OK</td>\n')
+                    file.write('<td><font color="ooffoo">OK</font></td>\n')
                 else:
                     failed.append(filename)
-                    file.write('<td>FAIL</td>\n')
+                    file.write('<td><font color="ff0000">FAIL</font></td>\n')
                 file.write('<tr>\n')
 
         # Finish up





More information about the Bf-blender-cvs mailing list