[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30360] branches/soc-2010-leifandersen/ tests/render/run.py: 1.

Leif Andersen leif.a.andersen at gmail.com
Thu Jul 15 05:00:38 CEST 2010


Revision: 30360
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30360
Author:   leifandersen
Date:     2010-07-15 05:00:38 +0200 (Thu, 15 Jul 2010)

Log Message:
-----------
1.  Images now viable in browsers where file:// isn't automatically appended to images and links in an absolute path.  Of course...this means the folder still can't be moved.

Now I think all of the bugs are gone.

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-07-15 02:42:33 UTC (rev 30359)
+++ branches/soc-2010-leifandersen/tests/render/run.py	2010-07-15 03:00:38 UTC (rev 30360)
@@ -487,9 +487,9 @@
     for frame in animation.good_path_arr:
         file.write('<tr>\n')
         file.write('<td> Frame: ' + str(i) +  '</td>\n')
-        file.write('<td><a href="' + animation.good_path_arr[i-1] + '"><img src="' + animation.good_path_arr[i-1] + '" alt="Good Image" width="200" height="150"></a></td>\n')
-        file.write('<td><a href="' + animation.test_path_arr[i-1] + '"><img src="' + animation.test_path_arr[i-1] + '" alt="Latest Render" width="200" height="150"></a></td>\n')
-        file.write('<td><a href="' + animation.diff_path_arr[i-1] + '"><img src="' + animation.diff_path_arr[i-1] + '" alt="Image Diff" width="200" height="150"></a></td>\n')
+        file.write('<td><a href="file://' + animation.good_path_arr[i-1] + '"><img src="file://' + animation.good_path_arr[i-1] + '" alt="Good Image" width="200" height="150"></a></td>\n')
+        file.write('<td><a href="file://' + animation.test_path_arr[i-1] + '"><img src="file://' + animation.test_path_arr[i-1] + '" alt="Latest Render" width="200" height="150"></a></td>\n')
+        file.write('<td><a href="file://' + animation.diff_path_arr[i-1] + '"><img src="file://' + animation.diff_path_arr[i-1] + '" alt="Image Diff" width="200" height="150"></a></td>\n')
         file.write('<td>')
         if animation.passed_arr[i-1]:
             file.write('<font color="ooffoo">OK</font>: ' + str(animation.bad_pixels_arr[i-1]) + ' of ' + str(animation.pixel_count_arr[i-1]) + ' pixels different, ' + str(animation.difference) + '% different.')
@@ -540,9 +540,9 @@
             else:
                 file.write('<td>' +  image.name + '</td>\n')
             if image.mode == 'Image':
-                file.write('<td><a href="' + image.good_path + '"><img src="' + image.good_path + '" alt="Good Image" width="200" height="150"></a></td>\n')
-                file.write('<td><a href="' + image.test_path + '"><img src="' + image.test_path + '" alt="Latest Render" width="200" height="150"></a></td>\n')
-                file.write('<td><a href="' + image.diff_path + '"><img src="' + image.diff_path + '" alt="Image Diff" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.good_path + '"><img src="file://' + image.good_path + '" alt="Good Image" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.test_path + '"><img src="file://' + image.test_path + '" alt="Latest Render" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.diff_path + '"><img src="file://' + image.diff_path + '" alt="Image Diff" width="200" height="150"></a></td>\n')
             elif image.mode == 'Hash':
                 file.write('<td>' + str(image.good_hash) + '</td>')
                 file.write('<td>' + str(image.test_hash) + '</td>')
@@ -573,9 +573,9 @@
             else:
                 file.write('<td>' +  image.name + '</td>\n')
             if image.mode == 'Image':
-                file.write('<td><a href="' + image.good_path + '"><img src="' + image.good_path + '" alt="Good Image" width="200" height="150"></a></td>\n')
-                file.write('<td><a href="' + image.test_path + '"><img src="' + image.test_path + '" alt="Latest Render" width="200" height="150"></a></td>\n')
-                file.write('<td><a href="' + image.diff_path + '"><img src="' + image.diff_path + '" alt="Image Diff" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.good_path + '"><img src="file://' + image.good_path + '" alt="Good Image" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.test_path + '"><img src="file://' + image.test_path + '" alt="Latest Render" width="200" height="150"></a></td>\n')
+                file.write('<td><a href="file://' + image.diff_path + '"><img src="file://' + image.diff_path + '" alt="Image Diff" width="200" height="150"></a></td>\n')
             elif image.mode == 'Hash':
                 file.write('<td>' + str(image.good_hash) + '</td>')
                 file.write('<td>' + str(image.test_hash) + '</td>')
@@ -688,7 +688,7 @@
             print 'FAILED'
 
     # Output Result
-    if not options.building_tests:
+    if not options.building_tests and len(args) > 0:
         print 'Generating Output'
         generate_output(cases, os.path.join(HTML_OUTPUT, 'index.html'))
     console_output(cases, options.building_tests, False)





More information about the Bf-blender-cvs mailing list