aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/tests/optimization-test
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-01-15 11:45:40 -0800
committerMatt Turner <[email protected]>2013-01-22 14:33:24 -0800
commitefd201caa5cbfaf10d0ecad219046a9fe3593c4b (patch)
tree21930b02c385defb8e77d4e7152bc7c1d3ea03fd /src/glsl/tests/optimization-test
parent86d30dea3c13d29ef8d39bc18db63a0441051975 (diff)
glsl/build: Build tests via the glsl Makefile
Tested-by: Andreas Boll <[email protected]>
Diffstat (limited to 'src/glsl/tests/optimization-test')
-rwxr-xr-xsrc/glsl/tests/optimization-test10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glsl/tests/optimization-test b/src/glsl/tests/optimization-test
index 363c6ccda56..59383f8f912 100755
--- a/src/glsl/tests/optimization-test
+++ b/src/glsl/tests/optimization-test
@@ -1,5 +1,11 @@
#!/bin/bash
+if [ ! -z "$srcdir" ]; then
+ compare_ir=`pwd`/tests/compare_ir
+else
+ compare_ir=./compare_ir
+fi
+
total=0
pass=0
@@ -8,12 +14,12 @@ for test in `find . -iname '*.opt_test'`; do
echo -n "Testing $test..."
(cd `dirname "$test"`; ./`basename "$test"`) > "$test.out" 2>&1
total=$((total+1))
- if $PYTHON2 $PYTHON_FLAGS ./compare_ir "$test.expected" "$test.out" >/dev/null 2>&1; then
+ if $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out" >/dev/null 2>&1; then
echo "PASS"
pass=$((pass+1))
else
echo "FAIL"
- $PYTHON2 $PYTHON_FLAGS ./compare_ir "$test.expected" "$test.out"
+ $PYTHON2 $PYTHON_FLAGS $compare_ir "$test.expected" "$test.out"
fi
done