[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:54:18 PDT 2013


Bah! Ignore.  Didn't realize my repo was slightly out of date. Sorry about that!

On Thu, Apr 18, 2013 at 3:39 PM, Tom Gall <tom.gall at linaro.org> wrote:
> 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
>



-- 
Regards,
Tom

"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com


More information about the Piglit mailing list