[Piglit] [PATCH 34/34] gen_cl_store_tests.py: hybridize for python 2/3
Dylan Baker
baker.dylan.c at gmail.com
Fri Feb 20 18:18:21 PST 2015
uses six.moves.range
generates the same results before and after.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
generated_tests/gen_cl_store_tests.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/generated_tests/gen_cl_store_tests.py b/generated_tests/gen_cl_store_tests.py
index 4bd6a46..37b6a95 100644
--- a/generated_tests/gen_cl_store_tests.py
+++ b/generated_tests/gen_cl_store_tests.py
@@ -26,6 +26,8 @@
import os
import textwrap
+from six.moves import range
+
from modules import utils
TYPES = ['char', 'uchar', 'short', 'ushort', 'int', 'uint', 'long', 'ulong', 'float', 'double']
@@ -36,7 +38,8 @@ utils.safe_makedirs(dirName)
def gen_array(size):
- return ' '.join([str(i) for i in xrange(size * 8)])
+ return ' '.join([str(i) for i in range(size * 8)])
+
def ext_req(type_name):
if type_name[:6] == "double":
--
2.3.0
More information about the Piglit
mailing list