[Mesa-dev] [PATCH v2 11/23] glsl/tests/optimisation-test: ensure that compare_ir is available

Eric Engestrom eric at engestrom.ch
Sun Mar 19 13:24:36 UTC 2017


On Friday, 2017-03-17 13:19:37 +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Bail out early if the script is not where we expect it to be.
> 
> v2: use -f instead of -e. latter returns true on folder(s)
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Eric, -r does not distinguish between files and folders so I've changed
> to -f and removed your r-b. I think as-is it addresses your comment,
> right ?

Yeah, I meant `-f $file -a -r $file` to test both that it's a file and
can be read, but the "can be read" part is not that important, so r-b
again :)

> ---
>  src/compiler/glsl/tests/optimization-test.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
> index 5ae5684f7c4..47970c6be29 100755
> --- a/src/compiler/glsl/tests/optimization-test.sh
> +++ b/src/compiler/glsl/tests/optimization-test.sh
> @@ -36,6 +36,11 @@ for dir in tests/*/; do
>      echo "$dir"
>  done
>  
> +if [ ! -f "$compare_ir" ]; then
> +    echo "Could not find compare_ir. Make sure that srcdir variable is correctly set."
> +    exit 1
> +fi
> +
>  echo "====== Testing optimization passes ======"
>  for test in `find . -iname '*.opt_test'`; do
>      echo -n "Testing $test..."
> -- 
> 2.11.1
> 


More information about the mesa-dev mailing list