[Piglit] [PATCH 07/45] gen_uniform_initializer_tests.py: use print_function

Dylan Baker baker.dylan.c at gmail.com
Wed Nov 12 15:45:49 PST 2014


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 generated_tests/gen_uniform_initializer_tests.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/generated_tests/gen_uniform_initializer_tests.py b/generated_tests/gen_uniform_initializer_tests.py
index 3c0831f..839790e 100644
--- a/generated_tests/gen_uniform_initializer_tests.py
+++ b/generated_tests/gen_uniform_initializer_tests.py
@@ -21,6 +21,7 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+from __future__ import print_function
 import os
 
 from templates import template_dir
@@ -90,7 +91,7 @@ def generate_tests(type_list, base_name, major, minor):
                 'execution',
                 'uniform-initializer',
                 '{0}-{1}{2}.shader_test'.format(target, base_name, t))
-            print test_file_name
+            print(test_file_name)
 
             dirname = os.path.dirname(test_file_name)
             if not os.path.exists(dirname):
@@ -108,7 +109,7 @@ def generate_tests(type_list, base_name, major, minor):
             for type_, num_values in type_list:
                 numbers = []
                 alt_numbers = []
-                for i in range(num_values):
+                for i in xrange(num_values):
                     numbers.append(get_value(type_, i + j))
                     alt_numbers.append(get_value(type_, i + j + 7))
 
@@ -148,7 +149,7 @@ def generate_array_tests(type_list, base_name, major, minor):
             'execution',
             'uniform-initializer',
             '{0}-{1}-array.shader_test'.format(target, base_name))
-        print test_file_name
+        print(test_file_name)
 
         dirname = os.path.dirname(test_file_name)
         if not os.path.exists(dirname):
-- 
2.1.3



More information about the Piglit mailing list