[Mesa-dev] [PATCH 3/4] glsl/tests/optimization-test: error out if we fail to generate any tests

Eric Engestrom eric.engestrom at imgtec.com
Fri Feb 24 15:58:28 UTC 2017


On Thursday, 2017-02-23 16:43:09 +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  src/compiler/glsl/tests/optimization-test | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/tests/optimization-test b/src/compiler/glsl/tests/optimization-test
> index ec0f09b125..d84b83cfaa 100755
> --- a/src/compiler/glsl/tests/optimization-test
> +++ b/src/compiler/glsl/tests/optimization-test
> @@ -18,15 +18,26 @@ fi
>  
>  total=0
>  pass=0
> +has_tests=0
>  
>  echo "======       Generating tests      ======"
>  for dir in tests/*/; do
>      if [ -e "${dir}create_test_cases.py" ]; then
> -        cd $dir; $PYTHON2 create_test_cases.py; cd ..
> +        cd $dir;
> +        $PYTHON2 create_test_cases.py
> +        if [ "x$?" = x0 ]; then

if $PYTHON2 create_test_cases.py; then
	...

With or without these nit-pick, patches 1-3 are:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

> +            has_tests=1
> +        fi
> +        cd ..
>      fi
>      echo "$dir"
>  done
>  
> +if [ "x$has_tests" = x0 ]; then
> +    echo "Could not generate any tests."
> +    exit 1
> +fi
> +
>  if [ ! -e "$compare_ir" ]; then
>      echo "Could not find compare_ir. Make sure that srcdir variable is correctly set."
>      exit 1
> -- 
> 2.11.0
> 


More information about the mesa-dev mailing list