[Piglit] [PATCH 1/1] generated-cl-int-builtins.py:detect and return ints and longs in getValue
Tom Gall
tom.gall at linaro.org
Thu Apr 18 13:39:49 PDT 2013
generated_tests/generate-cl-int-builtins.py in getValue, at the
very end some logic checks for an instance of an int and returns
it.
In the case of a long, this fails and results in a TypeError
killing the build.
Add a check for an instance of a long and return the number just
as is done for an int.
Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
generated_tests/generate-cl-int-builtins.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generated_tests/generate-cl-int-builtins.py b/generated_tests/generate-cl-int-builtins.py
index 5b6eaf6..22b0726 100755
--- a/generated_tests/generate-cl-int-builtins.py
+++ b/generated_tests/generate-cl-int-builtins.py
@@ -264,7 +264,7 @@ def getValue(type, val):
getValue(type, val[3]), getValue(type, val[4]))
#At this point, we should have been passed a number
- if (isinstance(val, int)):
+ if ((isinstance(val, int)) or (isinstance(val, long))):
return val;
print('Invalid value '+val+' encountered in getValue\n')
--
1.8.1.2
More information about the Piglit
mailing list